[Numpy-discussion] Possible new multiplication operators for Python
Sun Aug 17 17:59:15 CDT 2008
On Sun, Aug 17, 2008 at 17:00, Ondrej Certik <firstname.lastname@example.org> wrote:
> There is some inconsistency though, for example one can override A() +
> A(), but one cannot override 1 + 1. This could (should) be fixed
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.
"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
More information about the Numpy-discussion