You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Better 3.2/33 store_locals handling
This commit is contained in:
BIN
test/bytecode_3.3/05_store_locals.pyc
Normal file
BIN
test/bytecode_3.3/05_store_locals.pyc
Normal file
Binary file not shown.
@@ -1962,11 +1962,16 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
code._tokens = None # save memory
|
code._tokens = None # save memory
|
||||||
assert ast == 'stmts'
|
assert ast == 'stmts'
|
||||||
|
|
||||||
|
if 3.0 <= self.version <= 3.3:
|
||||||
|
try:
|
||||||
|
if ast[0][0][0] == 'store_locals':
|
||||||
|
if self.hide_internal: del ast[0]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if ast[0][0] == NAME_MODULE:
|
if ast[0][0] == NAME_MODULE:
|
||||||
if self.hide_internal: del ast[0]
|
if self.hide_internal: del ast[0]
|
||||||
elif ast[1][0] == NAME_MODULE:
|
|
||||||
if self.hide_internal: del ast[1]
|
|
||||||
pass
|
pass
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
Reference in New Issue
Block a user