PyDocs

Nav

Data Types

Repr

reprlib

class (source)
  • Repr(*, maxlevel=6, maxtuple=6, maxlist=6, maxarray=5, maxdict=4, maxset=6, maxfrozenset=6, maxdeque=6, maxstring=30, maxlong=40, maxother=30, fillvalue='...', indent=None)
Class which provides formatting services useful in implementing functions similar to the built-in repr(); size limits for different object types are added to avoid the generation of representations which are excessively long.
Changed in 3.12
  • 3.12: Allow attributes to be set via keyword arguments.
Members of Repr

f

fillvalue
This string is displayed for recursive references.

i

indent
If this attribute is set to None (the default), the output is formatted with no line breaks or indentation, like the standard repr().

m

maxarray
Limits on the number of entries represented for the named object type.
maxdeque
Limits on the number of entries represented for the named object type.
maxdict
Limits on the number of entries represented for the named object type.
maxfrozenset
Limits on the number of entries represented for the named object type.
maxlevel
Depth limit on the creation of recursive representations.
maxlist
Limits on the number of entries represented for the named object type.
maxlong
Maximum number of characters in the representation for an integer.
maxother
This limit is used to control the size of object types for which no specific formatting method is available on the Repr object.
maxset
Limits on the number of entries represented for the named object type.
maxstring
Limit on the number of characters in the representation of the string.
maxtuple
Limits on the number of entries represented for the named object type.

r

repr
The equivalent to the built-in repr() that uses the formatting imposed by the instance.
repr1
Recursive implementation used by repr().
0 Examples
No examples for reprlib/Repr.
See Also
No see-alsos for reprlib/Repr
0 Notes
No notes for Repr