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

Function saferepr

Lib/pprint.py:71–73  ·  view source on GitHub ↗

Version of repr() which can handle recursive data structures.

(object)

Source from the content-addressed store, hash-verified

69
70
71def saferepr(object):
72 """Version of repr() which can handle recursive data structures."""
73 return PrettyPrinter()._safe_repr(object, {}, None, 0)[0]
74
75
76def isreadable(object):

Callers

nothing calls this directly

Calls 2

PrettyPrinterClass · 0.85
_safe_reprMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…