A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-January/059827.html below:

[Python-Dev] index (was str with base)

[Python-Dev] index (was str with base) [Python-Dev] index (was str with base)Jim Jewett jimjjewett at gmail.com
Tue Jan 17 15:49:46 CET 2006
Guido wrote:

> more important to implement __index__() in Python 2.5.
> This behaves like __int__() for integral types, but is not
> defined for float or Decimal.

Why not for Decimal, or even float?  I would not be surprised
if 10.798 failed, but I would expect 1000D to work.

If indexing worked with more arbitrary extension integers,
then I would expect it work with Decimal, and possibly float,
when the number == a whole number, and to raise ValueError
otherwise.

-jJ
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