repr
repr(object)
Returns a string containing a printable representation of an object. This is the same value yielded by string-conversions (reverse quotes). It is sometimes useful to be able to access this operation as an ordinary function. For many types, this function makes an attempt to return a string that would yield an object with the same value when passed to eval.
To make this function work on your own classes, implement the __repr__ method.
last updated 2 years ago by effbot #
