Diez B. Roggisch a écrit :
Christian Heimes wrote:
netimen wrote:
How can I substitute __str__ method of an instance?
It's not possible. For performance and other reasons most __*__ methods
are looked up on the type only.
Is that documented somewhere? I *know* it is that way, yet I'd like to have
place to read up on it (and point to when this question pops up)
http://docs.python.org/reference/datamodel.html#special-method-lookup-for-new-style-classes
--
http://mail.python.org/mailman/listinfo/python-list