We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.



Returns a string containing a nicely printable representation of an object. For strings, this returns the string itself. The difference with repr(object) is that str(object) does not always attempt to return a string that is acceptable to eval; its goal is to return a printable string. If no argument is given, returns the empty string, ''.

To make this function work on your own classes, implement the __str__ method. If __str__ isn’t defined, this function falls back on __repr__.