You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
2.6 conditional in list comprehension bug
This commit is contained in:
@@ -9,7 +9,12 @@
|
|||||||
# list_iter ::= lc_body
|
# list_iter ::= lc_body
|
||||||
# lc_body ::= expr LIST_APPEND
|
# lc_body ::= expr LIST_APPEND
|
||||||
|
|
||||||
[b for b in (0,1,2,3)] if __name__ == '__main__' else 5
|
# Use line breaks so we can see what's going on in assembly
|
||||||
|
[b
|
||||||
|
for b in
|
||||||
|
(0,1,2,3)
|
||||||
|
] if (__name__ == '__main__'
|
||||||
|
) else 5
|
||||||
|
|
||||||
# Python2:
|
# Python2:
|
||||||
# list_compr ::= BUILD_LIST_0 list_iter
|
# list_compr ::= BUILD_LIST_0 list_iter
|
||||||
|
@@ -165,7 +165,7 @@ class Python26Parser(Python2Parser):
|
|||||||
|
|
||||||
def p_misc(self, args):
|
def p_misc(self, args):
|
||||||
'''
|
'''
|
||||||
conditional ::= expr jmp_false expr jf_cf_pop expr
|
conditional ::= expr jmp_false expr jf_cf_pop expr come_from_opt
|
||||||
'''
|
'''
|
||||||
|
|
||||||
class Python26ParserSingle(Python2Parser, PythonParserSingle):
|
class Python26ParserSingle(Python2Parser, PythonParserSingle):
|
||||||
|
Reference in New Issue
Block a user