You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +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
|
||||
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:
|
||||
if ast[0][0] == NAME_MODULE:
|
||||
if self.hide_internal: del ast[0]
|
||||
elif ast[1][0] == NAME_MODULE:
|
||||
if self.hide_internal: del ast[1]
|
||||
pass
|
||||
except:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user