[Python-Dev] __index__ clipping

Guido van Rossum guido at python.org
Thu Aug 10 23:44:22 CEST 2006


Thanks for your understanding.

Anyway, Nick's patch differs in at least one significant way from my
proposal -- (10**10).__index__() returns sys.maxint in his patch,
while I want it to return 10000000000L. So this is still an open
issue.

--Guido

On 8/10/06, Travis E. Oliphant <oliphant.travis at ieee.org> wrote:
> 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
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list