[Python-Dev] index (was str with base) (original) (raw)
Jim Jewett jimjjewett at gmail.com
Tue Jan 17 15:49:46 CET 2006
- Previous message: [Python-Dev] str with base
- Next message: [Python-Dev] index (was str with base)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] str with base
- Next message: [Python-Dev] index (was str with base)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]