[Python-Dev] sum(...) limitation

Andrea Griffini agriff at tin.it
Fri Aug 1 23:48:37 CEST 2014

help(sum) tells clearly that it should be used to sum numbers and not
strings, and with strings actually fails.

However sum([[1,2,3],[4],[],[5,6]], []) concatenates the lists.

Is this to be considered a bug?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140801/f70a8c83/attachment.html>

More information about the Python-Dev mailing list