[Python-Dev] __index__ clipping

Travis E. Oliphant oliphant.travis at ieee.org
Thu Aug 10 20:25:00 CEST 2006


Guido van Rossum wrote:
> On 8/10/06, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> Guido van Rossum wrote:
>>>> It seems like Nick's recent patches solved the problems that were
>>>> identified.
>>> Nick, can you summarize how your patches differ from my proposal?
>> nb_index and __index__ are essentially exactly as you propose.
> 
> Then I don't understand why Travis is objecting against my proposal!

I must have missed his most recent patch that changed the result to 
return a Python object.  I thought earlier versions didn't do that.

My objection is not particularly solid.  At this point it's largely a 
wish to avoid the extra overhead (there are some camps that already 
complain about NumPy having too much indexing overhead --- although they 
should be using Python lists for there purposes if indexing overhead 
really is a problem).

As it appears that several people feel this is the best way forward, 
then I'll re-work my NumPy code.   I still appreciate the change that 
allows other Python objects to be integers and eliminates the "only true 
integers allowed" flavor of several places in the Python code.

Thanks for all your hard work.

-Travis



More information about the Python-Dev mailing list