more deparse_code -> code_deparse API additions

This commit is contained in:
rocky
2018-03-01 16:55:45 -05:00
parent ef076c065b
commit 2edc757b6f
5 changed files with 65 additions and 17 deletions

View File

@@ -2712,7 +2712,7 @@ def code_deparse(co, out=sys.stdout, version=None, debug_opts=DEFAULT_DEBUG_OPTS
# Build Syntax Tree from disassembly.
linestarts = dict(scanner.opc.findlinestarts(co))
deparsed = walker(version, out, scanner, showast=debug_opts['ast'],
deparsed = walker(version, out, scanner, showast=debug_opts.get('ast', None),
debug_parser=debug_parser, compile_mode=compile_mode,
is_pypy=is_pypy, linestarts=linestarts)