FAQ: __str__ vs __repr__
Simon Brunning
simon.brunning at gmail.com
Tue Jun 21 05:35:08 EDT 2005
On 6/15/05, Peter Hansen <peter at engcorp.com> wrote:
> __repr__ shouldn't be anything, if you don't have an actual need for it.
> Neither should __str__.
Oh, I don't know. __str__ is so frequently useful in debugging and
logging that I always try and do something useful with it.
--
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/
More information about the Python-list
mailing list