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

Sergey sergemp at mail.ru
Tue Jul 9 11:35:30 CEST 2013


On Jul 5, 2013 Stefan Behnel wrote:

> No, please. Using sum() on lists is not more than a hack that
> seems to be a cool idea but isn't. Seriously - what's the sum of
> lists? Intuitively, it makes no sense at all to say sum(lists).

It's the same as it is now. What else can you think about when you
see: [1, 2, 3] + [4, 5] ?

Seriously, why there's so much holy wars about that? I'm not asking
to rewrite cpython on Java or C#. I'm not adding a bunch of new
functions, I'm not even changing signatures of existing functions.

It's just among hundreds of existing functions I took one and made it
faster for some use-cases. That's all! It's just a minor optimization
patch.

If instead I optimized e.g. ConfigParser [1] then nobody would care.
Then why so many people care about this one?

-- 
[1] http://bugs.python.org/issue7113


More information about the Python-ideas mailing list