Can print() be reloaded for a user defined class?

alex23 wuwei23 at
Sun Sep 20 14:10:52 CEST 2009

Peng Yu <pengyu... at> wrote:
> Is __repr__ = __str__ copy by reference or by value? If I change
> __str__ later on, will __repr__ be changed automatically?

What would you expect the outcome to be if these were functions rather
than class methods? (Or any type of object, really...)

Wouldn't it be quicker (and certainly less spammy) to test this out in
the interpreter?

More information about the Python-list mailing list