R. David Murray added the comment:

You are correct.  Effectively every class has an __str__, and that is what gets 
called when you print something without specifying any other formatting.  (I 
say effectively, because if there is no __str__ the __repr__ gets used, which 
every class *does* have via inheritance from the base object 'object'.)

For what it is worth, I just gave David Beasly's "Python Essential Reference" 
to someone who is a relatively new Python programmer but an experienced 
programmer, and he loved it.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17139>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to