reduce()--what is it good for? (was: Re: reduce() anomaly?)
SEE_AT_THE_END at hotmail.com
Mon Nov 10 11:50:20 CET 2003
"Alex Martelli" <aleax at aleax.it> wrote in message news:BsJrb.445840$R32.14865362 at news2.tin.it...
| is way faster than "reduce(operator.add, ..." -- and the advantage in
| speed *AND* simplicity grows even more when one considers how often
| that typical reduce is miscoded as "reduce(lambda x, y: x+y, ..." or
| "reduce(int.__add__, ..." and the like.
What's the difference between operator.add and int.__add__?
Why is operator.add faster and "better" than int.__add__ if we deal
More information about the Python-list