March 2003
Intermediate to advanced
656 pages
39h 30m
English
__str__
__str__(self)
The
str(
x
)
built-in type and the print
x statement call
x
.__str__( ) to
obtain an informal, concise string representation of
x. If __str__ is
absent, Python calls x
.__repr__ instead. __str__ should return a
conveniently human-readable string, even if it entails some
approximation.