Message192816
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. |
|
Date |
User |
Action |
Args |
2013-07-10 15:13:37 | ezio.melotti | set | recipients:
+ ezio.melotti, ronaldoussoren, r.david.murray, docs@python, marco.buttu |
2013-07-10 15:13:37 | ezio.melotti | set | messageid: <1373469217.51.0.594992673902.issue18424@psf.upfronthosting.co.za> |
2013-07-10 15:13:37 | ezio.melotti | link | issue18424 messages |
2013-07-10 15:13:37 | ezio.melotti | create | |
|