You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Python 3.1 "with" statement bug
This commit is contained in:
BIN
test/bytecode_3.1/07_withstmt_fn.pyc
Normal file
BIN
test/bytecode_3.1/07_withstmt_fn.pyc
Normal file
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
# Python 2.6 has a truly weird way of handling with here.
|
||||
# Python 2.6 has a truly weird way of handling "with" here.
|
||||
# added rule for 2.6
|
||||
# setupwith ::= DUP_TOP LOAD_ATTR ROT_TWO LOAD_ATTR CALL_FUNCTION_0 POP_TOP
|
||||
|
||||
|
@@ -698,6 +698,14 @@ class Python31Parser(Python32Parser):
|
||||
def p_31(self, args):
|
||||
"""
|
||||
binary_subscr2 ::= expr expr DUP_TOPX BINARY_SUBSCR
|
||||
setupwith ::= DUP_TOP LOAD_ATTR store LOAD_ATTR CALL_FUNCTION_0 POP_TOP
|
||||
withstmt ::= expr setupwith SETUP_FINALLY suite_stmts_opt
|
||||
POP_BLOCK LOAD_CONST COME_FROM_FINALLY
|
||||
load del_stmt WITH_CLEANUP END_FINALLY
|
||||
store ::= STORE_FAST
|
||||
store ::= STORE_NAME
|
||||
load ::= LOAD_FAST
|
||||
load ::= LOAD_NAME
|
||||
"""
|
||||
|
||||
class Python3ParserSingle(Python3Parser, PythonParserSingle):
|
||||
|
Reference in New Issue
Block a user