Return a formatted view of the bytecode operations.
(self)
| 739 | return _format_code_info(self.codeobj) |
| 740 | |
| 741 | def dis(self): |
| 742 | """Return a formatted view of the bytecode operations.""" |
| 743 | co = self.codeobj |
| 744 | if self.current_offset is not None: |
| 745 | offset = self.current_offset |
| 746 | else: |
| 747 | offset = -1 |
| 748 | with io.StringIO() as output: |
| 749 | _disassemble_bytes(_get_code_array(co, self.adaptive), |
| 750 | varname_from_oparg=co._varname_from_oparg, |
| 751 | names=co.co_names, co_consts=co.co_consts, |
| 752 | linestarts=self._linestarts, |
| 753 | line_offset=self._line_offset, |
| 754 | file=output, |
| 755 | lasti=offset, |
| 756 | exception_entries=self.exception_entries, |
| 757 | co_positions=co.co_positions(), |
| 758 | show_caches=self.show_caches) |
| 759 | return output.getvalue() |
| 760 | |
| 761 | |
| 762 | def main(): |
nothing calls this directly
no test coverage detected