This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients docs@python, ezio.melotti, marco.buttu, r.david.murray, ronaldoussoren
Date 2013-07-10.15:13:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373469217.51.0.594992673902.issue18424@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-07-10 15:13:37ezio.melottisetrecipients: + ezio.melotti, ronaldoussoren, r.david.murray, docs@python, marco.buttu
2013-07-10 15:13:37ezio.melottisetmessageid: <1373469217.51.0.594992673902.issue18424@psf.upfronthosting.co.za>
2013-07-10 15:13:37ezio.melottilinkissue18424 messages
2013-07-10 15:13:37ezio.melotticreate