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