The __str__ method
__str__(self)
Called by the str built-in function and by the print statement to
compute the informal
string representation of an object. This
differs from __repr__ in that it does not have to be a valid
Python expression: a more convenient or concise representation may be
used instead. The return value must be a string object.
last updated 1 year ago by effbot #


