I was looking at the builtin object methods in the Python documentation, and I was interested in the documentation for object.__repr__(self). Here\'s what it sa
Guideline: If you can succinctly provide an exact representation, format it as a Python expression (which implies that it can be both eval'd and copied directly into source code, in the right context). If providing an inexact representation, use <...> format.
There are many possible representations for any value, but the one that's most interesting for Python programmers is an expression that recreates the value. Remember that those who understand Python are the target audience—and that's also why inexact representations should include relevant context. Even the default , while almost entirely useless, still provides type, id() (to distinguish different objects), and indication that no better representation is available.