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

Method __init__

Lib/traceback.py:311–335  ·  view source on GitHub ↗

Construct a FrameSummary. :param lookup_line: If True, `linecache` is consulted for the source code line. Otherwise, the line will be looked up when first needed. :param locals: If supplied the frame locals, which will be captured as object representations.

(self, filename, lineno, name, *, lookup_line=True,
            locals=None, line=None,
            end_lineno=None, colno=None, end_colno=None, **kwargs)

Source from the content-addressed store, hash-verified

309 'name', '_lines', '_lines_dedented', 'locals', '_code')
310
311 def __init__(self, filename, lineno, name, *, lookup_line=True,
312 locals=None, line=None,
313 end_lineno=None, colno=None, end_colno=None, **kwargs):
314 """Construct a FrameSummary.
315
316 :param lookup_line: If True, `linecache` is consulted for the source
317 code line. Otherwise, the line will be looked up when first needed.
318 :param locals: If supplied the frame locals, which will be captured as
319 object representations.
320 :param line: If provided, use this instead of looking up the line in
321 the linecache.
322 """
323 self.filename = filename
324 self.lineno = lineno
325 self.end_lineno = lineno if end_lineno is None else end_lineno
326 self.colno = colno
327 self.end_colno = end_colno
328 self.name = name
329 self._code = kwargs.get("_code")
330 self._lines = line
331 self._lines_dedented = None
332 if lookup_line:
333 self.line
334 self.locals = {k: _safe_string(v, 'local', func=repr)
335 for k, v in locals.items()} if locals else None
336
337 def __eq__(self, other):
338 if isinstance(other, FrameSummary):

Callers

nothing calls this directly

Calls 3

_safe_stringFunction · 0.85
getMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected