String adding.

Jon Ribbens jon+python-list at unequivocal.co.uk
Thu Oct 19 05:20:00 EDT 2000


Huaiyu Zhu <hzhu at users.sourceforge.net> wrote:
> repr is suppose to contain information to reconstruct the object.

I understand that, but I don't understand why that is seen as a common
requirement.

> Say if you want to write something onto a text file and later eval it back,
> you would want to use repr.

But surely the most common situation is that you are writing it out for
the user to look at, and so you want str?

Cheers


Jon




More information about the Python-list mailing list