Improve set comprehension for Python 3.0

This commit is contained in:
rocky
2023-01-16 03:40:55 -05:00
parent 137dd64a46
commit 50697bb79e
3 changed files with 9 additions and 4 deletions

View File

@@ -465,7 +465,7 @@ class ComprehensionMixin:
self.write(": ")
self.preorder(n[1])
else:
if self.version == (3, 0):
if self.version == (3, 0) and len(n) > 1:
body = n[1]
else:
body = n[0]