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.6+ specialization
This commit is contained in:
@@ -47,10 +47,8 @@ import xdis.opcodes.opcode_33 as op3
|
||||
from uncompyle6.scanner import Scanner
|
||||
|
||||
import sys
|
||||
from xdis.version_info import PYTHON3
|
||||
|
||||
if PYTHON3:
|
||||
intern = sys.intern
|
||||
intern = sys.intern
|
||||
|
||||
globals().update(op3.opmap)
|
||||
|
||||
@@ -379,7 +377,7 @@ class Scanner3(Scanner):
|
||||
# pattr = 'code_object @ 0x%x %s->%s' %\
|
||||
# (id(const), const.co_filename, const.co_name)
|
||||
pattr = "<code_object " + const.co_name + ">"
|
||||
elif isinstance(const, str) or xdis.PYTHON_VERSION <= 2.7 and isinstance(const, unicode):
|
||||
elif isinstance(const, str):
|
||||
opname = "LOAD_STR"
|
||||
else:
|
||||
if isinstance(inst.arg, int) and inst.arg < len(co.co_consts):
|
||||
|
Reference in New Issue
Block a user