Python 3.7+ optimized if in comprehension

This commit is contained in:
rocky
2019-12-28 18:01:52 -05:00
parent b2e1edb434
commit 566143b515
7 changed files with 25 additions and 2 deletions

View File

@@ -143,9 +143,14 @@ def customize_for_version3(self, version):
list_ifs.append([1])
n = n[2]
pass
elif n == "list_if37":
list_ifs.append(n)
n = n[-1]
pass
pass
assert n == "lc_body", ast
self.preorder(n[0])
# FIXME: add indentation around "for"'s and "in"'s