[Python-ideas] Fast sum() for non-numbers - why so much worries?
Ron Adam
ron3200 at gmail.com
Tue Jul 9 15:47:06 CEST 2013
On 07/09/2013 04:35 AM, Sergey wrote:
> 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 the nature of this particular news group. We focus on improving
python, and that includes new things and improving old things, but also
includes discussing any existing or potential problems.
You will almost always get a mix of approval and disapproval on just about
every thing here. It's not a war, it's just different people having
different opinions.
Quite often that leads to finding better ways to do things, and in the long
run, helps avoid adding features and changes that could be counter
productive to python.
> 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 it only makes an existing function faster and doesn't change any other
behaviour, and all the tests still pass for it. Just create an issue on
the tracker, with the patch posted there, and it will probably be accepted
after it goes through a much more focused review process.
But discussing it here will invite a lot of opinions about how it works,
how it shouldn't work, what would work better, and etc... It's what this
board if for. ;-)
Cheers,
Ron
> 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