Simon Brunning wrote: > On 6/15/05, Peter Hansen <[EMAIL PROTECTED]> 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.
Interesting: for the same purpose, I would define __repr__. But I still define it only when I actually care about the details, since otherwise the default __repr__ is always there. Spending time figuring out a potentially more useful __str__/__repr__ (how nice that we've confused the issue of which to use, again! ;-) ) is not my idea of a good use of time, what with YAGNI and all from XP... -Peter -- http://mail.python.org/mailman/listinfo/python-list