MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/dis.py:1050–1065  ·  view source on GitHub ↗
(self, x, *, first_line=None, current_offset=None, show_caches=False, adaptive=False, show_offsets=False, show_positions=False)

Source from the content-addressed store, hash-verified

1048 Iterating over this yields the bytecode operations as Instruction instances.
1049 """
1050 def __init__(self, x, *, first_line=None, current_offset=None, show_caches=False, adaptive=False, show_offsets=False, show_positions=False):
1051 self.codeobj = co = _get_code_object(x)
1052 if first_line is None:
1053 self.first_line = co.co_firstlineno
1054 self._line_offset = 0
1055 else:
1056 self.first_line = first_line
1057 self._line_offset = first_line - co.co_firstlineno
1058 self._linestarts = dict(findlinestarts(co))
1059 self._original_object = x
1060 self.current_offset = current_offset
1061 self.exception_entries = _parse_exception_table(co)
1062 self.show_caches = show_caches
1063 self.adaptive = adaptive
1064 self.show_offsets = show_offsets
1065 self.show_positions = show_positions
1066
1067 def __iter__(self):
1068 co = self.codeobj

Callers

nothing calls this directly

Calls 3

_get_code_objectFunction · 0.85
findlinestartsFunction · 0.85
_parse_exception_tableFunction · 0.85

Tested by

no test coverage detected