You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
23 lines
674 B
Python
23 lines
674 B
Python
# Tests:
|
|
|
|
# Python2:
|
|
# assert_expr_and ::= assert_expr jmp_false expr
|
|
# and ::= expr jmp_false expr \e__come_from
|
|
# expr ::= list_compr
|
|
# list_iter ::= list_for
|
|
# list_for ::= expr _for designator list_iter JUMP_BACK
|
|
# list_iter ::= lc_body
|
|
# lc_body ::= expr LIST_APPEND
|
|
|
|
[b for b in (0,1,2,3)] if __name__ == '__main__' else 5
|
|
|
|
# Python2:
|
|
# list_compr ::= BUILD_LIST_0 list_iter
|
|
# list_iter ::= list_for
|
|
# list_for ::= expr _for designator list_iter JUMP_BACK
|
|
# list_iter ::= list_for
|
|
# list_for ::= expr _for designator list_iter JUMP_BACK
|
|
# list_iter ::= lc_body
|
|
# lc_body ::= expr LIST_APPEND
|
|
# [ i * j for i in range(4) for j in range(7) ]
|