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

Method write_repr

Tools/gdb/libpython.py:559–570  ·  view source on GitHub ↗
(self, out, visited)

Source from the content-addressed store, hash-verified

557 return InstanceProxy(tp_name, attr_dict, int(self._gdbval))
558
559 def write_repr(self, out, visited):
560 # Guard against infinite loops:
561 if self.as_address() in visited:
562 out.write('<...>')
563 return
564 visited.add(self.as_address())
565
566 pyop_attrs = self.get_keys_values()
567 if not pyop_attrs:
568 pyop_attrs = self.get_attr_dict()
569 _write_instance_repr(out, visited,
570 self.safe_tp_name(), pyop_attrs, self.as_address())
571
572class ProxyException(Exception):
573 def __init__(self, tp_name, args):

Callers

nothing calls this directly

Calls 7

get_keys_valuesMethod · 0.95
get_attr_dictMethod · 0.95
_write_instance_reprFunction · 0.85
as_addressMethod · 0.45
writeMethod · 0.45
addMethod · 0.45
safe_tp_nameMethod · 0.45

Tested by

no test coverage detected