[Python-ideas] Rehabilating reduce (as "fold")

Serhiy Storchaka storchaka at gmail.com
Fri Jul 12 22:13:31 CEST 2013


12.07.13 22:53, Alexander Belopolsky написав(ла):
> On Fri, Jul 12, 2013 at 10:54 AM, Barry Warsaw
> <barry at python.org
> <mailto:barry at python.org>> wrote:
>      >(Independent of this idea, it would actually be nice if the
>     operator module
>      >had a dictionary mapping from op symbols to names, like
>      >operator.by_symbol["+="] giving operator.iadd)
>
>     ...but this is a neat idea.
>
> -1
>
> This is neat, but I don't really see much use beyond implementing things
> like fold("+=", ..) that you've just rejected.

Concur with Alexander. Why you want yet one alternative names for 
operators? What are alternative names for operator.neg() and 
operator.sub(). If any of them is not "-" then what is a benefit?



More information about the Python-ideas mailing list