You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
version=None in deparse_code() uses sys.version...
(the current interpreter version) as the version to decompile. Fixes #159.
This commit is contained in:
@@ -2613,10 +2613,15 @@ def deparse_code(version, co, out=sys.stdout, showasm=None, showast=False,
|
||||
showgrammar=False, code_objects={}, compile_mode='exec',
|
||||
is_pypy=False, walker=SourceWalker):
|
||||
"""
|
||||
ingests and deparses a given code block 'co'
|
||||
ingests and deparses a given code block 'co'. If version is None,
|
||||
we will use the current Python interpreter version.
|
||||
"""
|
||||
|
||||
assert iscode(co)
|
||||
|
||||
if version == None:
|
||||
version = float(sys.version[0:3])
|
||||
|
||||
# store final output stream for case of error
|
||||
scanner = get_scanner(version, is_pypy=is_pypy)
|
||||
|
||||
|
Reference in New Issue
Block a user