[Python-ideas] Fast sum summary [was Re: Fast sum() for non-numbers - why so much worries?]

Paul Moore p.f.moore at gmail.com
Sat Jul 13 11:11:07 CEST 2013


On 12 July 2013 22:57, Sergey <sergemp at mail.ru> wrote:

> That's what Alex Martelli, author of sum(), initially did [1]:
> > for the simple reason that I special-case this -- when the first
> > item is a PyBaseString_Type, I delegate to ''.join
>
> So you can, kind of, say that sum was DESIGNED to have special cases
> from the very beginning.
>

Thanks for the reference. That's the *original* implementation. So why does
the current sum() not do this? You need to locate the justification for the
removal of this special case, and explain why that reason no longer applies.

My recollection (yes, I was round for those original discussions!) is that
the key point is that "Guido said no". If I'm right, have you persuaded
Guido to change his mind? To my knowledge he's not commented in this thread.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130713/605f229f/attachment.html>


More information about the Python-ideas mailing list