Unexpected return value from __add__

Alex Martelli aleax at aleax.it
Fri Sep 7 08:48:06 EDT 2001


"Magnus Lycka" <magnus at thinkware.se> wrote in message
news:3B989F3D.8D355CC4 at thinkware.se...
    ...
> has the value 0! But if I remove the # in __add__, I see a
> printout of just the value I expected! Somehow it seems to
> get lost when I return it! Some strange scope thingie???
>
> I'm using ActivePython build 2.1.211

I copy-and-pasted your code, ran it, and just got:
"""
Ran 1 tests in 0.010s

OK
"""

Python 2.1.1 standard distribution under Windows NT4 SP6.
So maybe there's some VERY strange bug in the specific
ActivePython build you're using...?  Unlikely, I know,
but...


Alex






More information about the Python-list mailing list