On Oct 21, 2019, at 09:29, Steven D'Aprano <st...@pearwood.info> wrote:
> 
> What did you think it was, if it wasn't a 
> specialised "sum these values" function?

For what it’s worth, I initially thought it was a general fold function, using 
the magic of optional parameters and operator polymorphism to default to the 
most common reduction operation for a whole bunch of types. But it only took a 
few seconds to realize I was wrong. (Although I think this was added not long 
after new-style classes and the full dunder protocols, so I probably did have 
fun building a wrapper type that I could pass to sum and use it efficiently as 
a generic fold function against its will, it was pretty obvious that’s not what 
it was for.)

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/LTO3ETUL3HMGEEZ5SESIIFBKXC6QHJL4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to