Files
python-uncompyle6/test/simple_source/bug26/03_weird.py
rocky 0df29f344e Fix some really weird Python 2.6 constructs
From 2.6's test grammar.
2017-12-03 18:41:31 -05:00

11 lines
304 B
Python

# From Python 2.6 test_grammar where it says:
# Grammar allows multiple adjacent 'if's in listcomps and genexps,
# even though it's silly. Make sure it works (ifelse broke this.)
[ x for x in range(10) if x % 2 if x % 3 ]
list(x for x in range(10) if x % 2 if x % 3)
# FIXME
# (5 if 1 else max(5, 2))