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

2006-01-17 Thread Adam Olsen
On 1/17/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 1/17/06, Jim Jewett <[EMAIL PROTECTED]> wrote: > > 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. > > > >

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

2006-01-17 Thread Guido van Rossum
On 1/17/06, Jim Jewett <[EMAIL PROTECTED]> wrote: > 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.79

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

2006-01-17 Thread Jim Jewett
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