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

@@ -67,6 +67,7 @@ def customize_for_version37(self, version):
'%[3]{pattr.replace("-", " ")} %p %p', (0, 19), (6, 19) ),
'if_exp_37a': ( '%p if %p else %p', (1, 'expr', 27), (0, 27), (4, 'expr', 27) ),
'if_exp_37b': ( '%p if %p else %p', (2, 'expr', 27), (0, 'expr', 27), (5, 'expr', 27) ),
'list_if37': ( " if %p%c", (0, 27), 1 ),
'testfalse_not_or': ( "not %c or %c",
(0, "expr"),
(2, "expr") ),