A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-December/059046.html below:

[Python-Dev] NotImplemented reaching top-level

[Python-Dev] NotImplemented reaching top-level [Python-Dev] NotImplemented reaching top-levelFacundo Batista facundobatista at gmail.com
Sat Dec 24 18:31:19 CET 2005
Folks,

There's a bug about number coercion about Decimal
(http://www.python.org/sf/1355842).

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:

>>> d
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 +:
'Decimal' and
'float'
>>> d += 1.2
>>> d
NotImplemented
>>>

Thanks for any tip.

.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4