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.9 assert 2-arg bug
This commit is contained in:
Binary file not shown.
@@ -1,5 +1,22 @@
|
|||||||
# Tests:
|
# Tests:
|
||||||
|
# 2.7:
|
||||||
# assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1
|
# assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1
|
||||||
# call_function ::= expr expr expr CALL_FUNCTION_2
|
# call_function ::= expr expr expr CALL_FUNCTION_2
|
||||||
|
|
||||||
|
# 2.6
|
||||||
|
# assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 come_from_pop
|
||||||
|
|
||||||
assert isinstance(1, int)
|
assert isinstance(1, int)
|
||||||
|
|
||||||
|
# 2.6.9 DocXMLRPCServer.py
|
||||||
|
# 2.6
|
||||||
|
# assert2 ::= assert_expr jmp_true LOAD_ASSERT expr RAISE_VARARGS_2 come_from_pop
|
||||||
|
|
||||||
|
for method_name in self:
|
||||||
|
if method_name in self:
|
||||||
|
method = 'a'
|
||||||
|
else:
|
||||||
|
assert 0, "instance installed"
|
||||||
|
|
||||||
|
methods = 'b'
|
||||||
|
#
|
||||||
|
@@ -135,7 +135,6 @@ class Python2Parser(PythonParser):
|
|||||||
classdefdeco2 ::= LOAD_CONST expr mkfunc CALL_FUNCTION_0 BUILD_CLASS
|
classdefdeco2 ::= LOAD_CONST expr mkfunc CALL_FUNCTION_0 BUILD_CLASS
|
||||||
|
|
||||||
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr CALL_FUNCTION_1 RAISE_VARARGS_1
|
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr CALL_FUNCTION_1 RAISE_VARARGS_1
|
||||||
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr RAISE_VARARGS_2
|
|
||||||
|
|
||||||
assert_expr ::= expr
|
assert_expr ::= expr
|
||||||
assert_expr ::= assert_expr_or
|
assert_expr ::= assert_expr_or
|
||||||
|
@@ -69,6 +69,7 @@ class Python26Parser(Python2Parser):
|
|||||||
jmp_true ::= JUMP_IF_TRUE POP_TOP
|
jmp_true ::= JUMP_IF_TRUE POP_TOP
|
||||||
jmp_false ::= JUMP_IF_FALSE POP_TOP
|
jmp_false ::= JUMP_IF_FALSE POP_TOP
|
||||||
jf_pop ::= JUMP_FORWARD come_from_pop
|
jf_pop ::= JUMP_FORWARD come_from_pop
|
||||||
|
jf_pop ::= JUMP_ABSOLUTE come_from_pop
|
||||||
jb_pop ::= JUMP_BACK come_from_pop
|
jb_pop ::= JUMP_BACK come_from_pop
|
||||||
|
|
||||||
jb_cf_pop ::= JUMP_BACK come_froms POP_TOP
|
jb_cf_pop ::= JUMP_BACK come_froms POP_TOP
|
||||||
@@ -87,6 +88,7 @@ class Python26Parser(Python2Parser):
|
|||||||
def p_stmt26(self, args):
|
def p_stmt26(self, args):
|
||||||
"""
|
"""
|
||||||
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 come_from_pop
|
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 come_from_pop
|
||||||
|
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr RAISE_VARARGS_2 come_from_pop
|
||||||
|
|
||||||
ifelsestmt ::= testexpr c_stmts_opt jf_pop else_suite COME_FROM
|
ifelsestmt ::= testexpr c_stmts_opt jf_pop else_suite COME_FROM
|
||||||
ifelsestmt ::= testexpr c_stmts_opt else_suitel come_froms POP_TOP
|
ifelsestmt ::= testexpr c_stmts_opt else_suitel come_froms POP_TOP
|
||||||
|
@@ -25,6 +25,8 @@ class Python27Parser(Python2Parser):
|
|||||||
def p_misc27(self, args):
|
def p_misc27(self, args):
|
||||||
"""
|
"""
|
||||||
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1
|
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1
|
||||||
|
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr RAISE_VARARGS_2
|
||||||
|
|
||||||
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD COME_FROM
|
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD COME_FROM
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user