On Wed, Jul 14, 2010 at 11:50 PM, Petre Galan <petre.ga...@gmail.com> wrote:
> No. The right interface is PyNumber_Long. The purpose of the PyNumber_Index 
> (and
> nb_index slot) is as index in slicing.

Allowing other objects to say "I'm a real integer, treat me as one" is
exactly what the nb_index slot is for (see PEP 357). The use as an
index in slicing was just the primary initial use case and the one
that was chosen as the name for the new slot because nb_int was
already taken for the lossy transformation. Indexing is not (and never
has been) intended to be the only use case.
_______________________________________________
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

Reply via email to