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

Method write_repr

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

Source from the content-addressed store, hash-verified

887 return result
888
889 def write_repr(self, out, visited):
890 # Guard against infinite loops:
891 if self.as_address() in visited:
892 out.write('[...]')
893 return
894 visited.add(self.as_address())
895
896 out.write('[')
897 for i in safe_range(int_from_int(self.field('ob_size'))):
898 if i > 0:
899 out.write(', ')
900 element = PyObjectPtr.from_pyobject_ptr(self[i])
901 element.write_repr(out, visited)
902 out.write(']')
903
904class PyLongObjectPtr(PyObjectPtr):
905 _typename = 'PyLongObject'

Callers

nothing calls this directly

Calls 8

safe_rangeFunction · 0.85
int_from_intFunction · 0.85
fieldMethod · 0.80
from_pyobject_ptrMethod · 0.80
as_addressMethod · 0.45
writeMethod · 0.45
addMethod · 0.45
write_reprMethod · 0.45

Tested by

no test coverage detected