language-x-isms

Alan Kennedy alanmk at hotmail.com
Thu Jun 8 06:54:52 EDT 2006


[Alan Kennedy]
>> Your comment makes "using a user-defined enumerate [on cpython] is
>> slower than using the built-in version" makes no sense in relation to
>> the code I posted

Fredrik Lundh wrote:
> try combining with the second sentence in my post.

OK, so putting "at least in CPython, using a user-defined enumerate
function is a bit
slower than using the built-in version"

together with

"""
in fact, if performance is important, the following can sometimes be
the most efficient way to loop over things

     ix = 0
     for fibo in my_list:
         do something with ix and my_list[ix]
         ix += 1
"""

We still don't get anything that sheds light on how the code I posted
is deficient.

Why can't you just say "I made a mistake, I thought your code replaced
the builtin enumerate, but it doesnt"?

I'm sorry I posted it now, what a rigmarole.

--
alan kennedy
------------------------------------------------------
email alan:              http://xhaus.com/contact/alan




More information about the Python-list mailing list