MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / saferepr

Function saferepr

tools/python-3.11.9-amd64/Lib/pprint.py:68–70  ·  view source on GitHub ↗

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

(object)

Source from the content-addressed store, hash-verified

66 pprint(object, *args, sort_dicts=sort_dicts, **kwargs)
67
68def saferepr(object):
69 """Version of repr() which can handle recursive data structures."""
70 return PrettyPrinter()._safe_repr(object, {}, None, 0)[0]
71
72def isreadable(object):
73 """Determine if saferepr(object) is readable by eval()."""

Callers

nothing calls this directly

Calls 2

PrettyPrinterClass · 0.85
_safe_reprMethod · 0.45

Tested by

no test coverage detected