Pythonic way to sum n-th list element?
Roy Smith
roy at panix.com
Tue Apr 22 08:48:34 EDT 2003
Alex Martelli <aleax at aleax.it> wrote:
> You're welcome, but for "sum([]) returns 0" you should thank Guido
> and Tim (it would raise a ValueError if I had implemented it my way;-).
It's hard to imagine that anybody who would put complex number support
in the core of the language, and use the One True Symbol for the
imaginary unit would think sum([]) should be anything but zero. I'm
with Guido j^2 on this one.
More information about the Python-list
mailing list