March 2003
Intermediate to advanced
656 pages
39h 30m
English
__repr__
__repr__(self)
The
repr(
x
)
built-in function call, the `x` expression form,
and the interactive interpreter (when x is
the result of an expression statement) call
x.__repr__( ) to
obtain an official, complete string representation of
x. If __repr__ is
absent, Python uses a default string representation. __repr__ should return a string with unambiguous
information on x. Ideally, when feasible,
the string should be an expression such that
eval(repr(
x
))==
x.
Read now
Unlock full access