ID EN
Pretty Print

format

Python 3.11

Returns three values: the formatted version of object as a string, a flag indicating whether the result is readable, and a flag indicating whether recursion was detected. The first argument is the object to be presented. The second is a dictionary which contains the id() of objects that are part of the current presentation context (direct and indirect containers for object that are affecting the presentation) as the keys; if an object needs to be presented which is already represented in context, the third return value should be True. Recursive calls to the format() method should add additiona

Syntax

PYTHON
PrettyPrinter.format(object, context, maxlevels, level)

See Also

id() format()