You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
marshal.py: Python2 marshal code shouldn't try to turn a code object
into a string. parse3.py: handle both keyword and positional function calls. scanner34.py: Remove extra level of quoting in LOAD_CONST. Keyward handling now works cross Python 2/3. Some other spelling and doc fixes.
This commit is contained in:
@@ -60,11 +60,16 @@ class Scanner34(scan.Scanner):
|
||||
jump_idx += 1
|
||||
pass
|
||||
pass
|
||||
# For constants, the pattr is the same as attr. Using pattr adds
|
||||
# an extra level of quotes which messes other things up, like getting
|
||||
# keyword attribute names in a call. I suspect there will be things
|
||||
# other than LOAD_CONST, but we'll start out with just this for now.
|
||||
pattr = inst.argval if inst.opname in ['LOAD_CONST'] else inst.argrepr
|
||||
tokens.append(
|
||||
Token(
|
||||
type_ = inst.opname,
|
||||
attr = inst.argval,
|
||||
pattr = inst.argrepr,
|
||||
pattr = pattr,
|
||||
offset = inst.offset,
|
||||
linestart = inst.starts_line,
|
||||
)
|
||||
|
Reference in New Issue
Block a user