[Python-Dev] NotImplemented reaching top-level
facundobatista at gmail.com
Sat Dec 24 18:31:19 CET 2005
There's a bug about number coercion about Decimal
The bug appeared after some changes Raymond and I did a few months
ago, solving something else (started to return NotImplemented instead
of raising TypeError, to better work with custom objects that
implements type coercion from Decimal).
The point is that I'm really astonished about the following behaviour,
and don't know where to start searching:
Decimal("1") # using decimal.py rev. 39328 from svn
>>> d + 1.2
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for +:
>>> d += 1.2
Thanks for any tip.
More information about the Python-Dev