[Python-ideas] Fast sum() for non-numbers

Joshua Landau joshua.landau.ws at gmail.com
Fri Jul 5 00:54:18 CEST 2013


On 4 July 2013 11:01, Haoyi Li <haoyi.sg at gmail.com> wrote:
> Random thought: this kind of "different implementations for different types"
> seems exactly what PEP443 (http://www.python.org/dev/peps/pep-0443/) is
> about; it would save you having the nasty big chunk of if-elses within sum()
> itself, and would let other people incrementally implement special sums for
> their own special data types without having to muck with the std lib code.

One thing I didn't understand from the original post was that this was
a "special case". I don't think I'll support any special-casing
without appropriate support from Python, such as with PEP443, first.


More information about the Python-ideas mailing list