Stuck newbie

sdd daniels at dsl-only.net
Wed Dec 3 11:46:39 EST 2003


Diez B. Roggisch wrote:

>... Lotsa good stuff ... Then 
> 
> print records[-1]
> The __repr__ method is automagically called when print is used on an object.

Well, it tries to call the __str__ method, which defaults to the
__repr__ method if no __str__ is defined.

pedantically yours,
-Scott David Daniels
Scott.Daniels at Acm.Org






More information about the Python-list mailing list