mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2024-10-07 18:23:42 +00:00
A 2.6 comprehension bug
This commit is contained in:
parent
1ce1cf87a4
commit
5b2198a4a6
BIN
test/bytecode_2.6/06_setif_comprehension.pyc
Normal file
BIN
test/bytecode_2.6/06_setif_comprehension.pyc
Normal file
Binary file not shown.
9
test/simple_source/bug26/06_setif_comprehension.py
Normal file
9
test/simple_source/bug26/06_setif_comprehension.py
Normal file
@ -0,0 +1,9 @@
|
||||
# From 2.6.9 abc.py
|
||||
|
||||
# For 2.6:
|
||||
# genexpr_func ::= setup_loop_lf FOR_ITER designator comp_iter JUMP_BACK come_from_pop JUMP_BACK POP_BLOCK COME_FROM
|
||||
|
||||
# This has been a bug in other Pythons after 2.6 were set comprehension {} is used instead of set().
|
||||
abstracts = set(name
|
||||
for name, value in namespace.items()
|
||||
if getattr(value, "__isabstractmethod__", False))
|
@ -130,6 +130,7 @@ class Python26Parser(Python2Parser):
|
||||
# Make sure we keep indices the same as 2.7
|
||||
setup_loop_lf ::= SETUP_LOOP LOAD_FAST
|
||||
genexpr_func ::= setup_loop_lf FOR_ITER designator comp_iter JUMP_BACK POP_BLOCK COME_FROM
|
||||
genexpr_func ::= setup_loop_lf FOR_ITER designator comp_iter JUMP_BACK come_from_pop JUMP_BACK POP_BLOCK COME_FROM
|
||||
'''
|
||||
|
||||
def p_ret26(self, args):
|
||||
|
Loading…
Reference in New Issue
Block a user