Return the deparsed text for a Python code object. `out` is where any intermediate output for assembly or tree output will be sent.
(
code,
out=sys.stdout,
version=None,
debug_opts=DEFAULT_DEBUG_OPTS,
code_objects={},
compile_mode="exec",
is_pypy=IS_PYPY,
walker=SourceWalker,
start_offset: int = 0,
stop_offset: int = -1,
)
| 1457 | |
| 1458 | |
| 1459 | def deparse_code2str( |
| 1460 | code, |
| 1461 | out=sys.stdout, |
| 1462 | version=None, |
| 1463 | debug_opts=DEFAULT_DEBUG_OPTS, |
| 1464 | code_objects={}, |
| 1465 | compile_mode="exec", |
| 1466 | is_pypy=IS_PYPY, |
| 1467 | walker=SourceWalker, |
| 1468 | start_offset: int = 0, |
| 1469 | stop_offset: int = -1, |
| 1470 | ) -> str: |
| 1471 | """ |
| 1472 | Return the deparsed text for a Python code object. `out` is where |
| 1473 | any intermediate output for assembly or tree output will be sent. |
| 1474 | """ |
| 1475 | return code_deparse( |
| 1476 | code, |
| 1477 | out, |
| 1478 | version, |
| 1479 | debug_opts, |
| 1480 | code_objects=code_objects, |
| 1481 | compile_mode=compile_mode, |
| 1482 | is_pypy=is_pypy, |
| 1483 | walker=walker, |
| 1484 | ).text |
| 1485 | |
| 1486 | |
| 1487 | if __name__ == "__main__": |
no test coverage detected