A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-August/135615.html below:

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

[Python-Dev] sum(...) limitationGuido van Rossum guido at python.org
Fri Aug 1 23:51:54 CEST 2014
No. We just can't put all possible use cases in the docstring. :-)


On Fri, Aug 1, 2014 at 2:48 PM, Andrea Griffini <agriff at tin.it> wrote:

> 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?
>
> Andrea
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/guido%40python.org
>
>


-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140801/7f1e5320/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4