Search notes:

Python: __repr__

An object's __repr__(), if defined, returns a represenation of the object's data as a string.
The returned string is supposed to be in a form that allows to re-create an object with the same data.
__repr__ is called by the built-in function repr().

See also

The concept of __repr__() is extended in IPython with so-called Rich Display.
Other dunders

Index