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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com