On Sun, Aug 17, 2008 at 17:00, Ondrej Certik <[EMAIL PROTECTED]> wrote: > There is some inconsistency though, for example one can override A() + > A(), but one cannot override 1 + 1. This could (should) be fixed > somehow.
This is getting off-topic, but I really hope that never changes. The difference between A.__add__ and int.__add__ is that you are defining A. Python defines int. If you mess with fundamental types like that, you will break other libraries and must confine yourself to just code that you've written. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion