Ezio Melotti added the comment:

Currently sum() is intended to work with numbers, explicitly forbids strings 
(as noted in the docstring), but also works with other types (even though it's 
inefficient).

If we want to document this, a possible wording might be:
    Returns the sum of a sequence of numbers plus the 
    value of parameter 'start' (which defaults to 0).  
    When the sequence is empty, returns start.
    Using sum() with a sequence of strings is not allowed,
    and might be inefficient with sequences of other types.

We should also consider that the implementation/behavior might change in 
future, but we can always update the docstring again.

+1 on the PEP 8 changes.

----------
nosy: +ezio.melotti

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18424>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to