language-x-isms

Gerard Flanagan grflanagan at yahoo.co.uk
Thu Jun 8 07:16:55 EDT 2006


Alan Kennedy wrote:
> [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.
>

I think this is a misunderstanding.  Personally, I read Fredrik's post
as a Point of Information not a Point of Criticism - as in "To you, and
anyone reading this thread, here's a detail you might consider..." - I
don't think it was ad hominem ( or ad code hominis! ) necessarily.

all the best

Gerard




More information about the Python-list mailing list