sum works in sequences (Python 3)
Ian Kelly
ian.g.kelly at gmail.com
Wed Sep 19 14:33:50 EDT 2012
On Wed, Sep 19, 2012 at 9:37 AM, Steve Howell <showell30 at yahoo.com> wrote:
> Sequences are iterables, so I'd say the docs are technically correct,
> but maybe I'm misunderstanding what you would be trying to clarify.
The doc string suggests that the argument to sum() must be a sequence,
when in fact any iterable will do. The restriction in the docs should
be relaxed to match the reality.
More information about the Python-list
mailing list