Bugs item #1619674, was opened at 2006-12-20 14:10
Message generated for change (Comment added) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1619674&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Kent Johnson (kjohnson)
>Assigned to: A.M. Kuchling (akuchling)
Summary: Minor error in sum() docs

Initial Comment:
In 2.1 Built-in Functions, the docs for sum() say it takes a sequence argument. 
IIUC the actual requirement is for an iterable which is a weaker requirement 
than a sequence. For example the argument can be a generator expression or a 
dict, neither of which is a sequence. Also there is a missing 'a' in the fourth 
sentence. 

Here is a suggested rewrite:

sum(iterable[, start])
    Sums start and the items of an iterable, from left to right, and returns 
the total. start defaults to 0. The iterable's items are normally numbers, and 
are not allowed to be strings. The fast, correct way to concatenate a sequence 
of strings...

----------------------------------------------------------------------

>Comment By: A.M. Kuchling (akuchling)
Date: 2006-12-20 15:12

Message:
Logged In: YES 
user_id=11375
Originator: NO

Thanks for pointing this out; I've changed the description of sum in rev.
53112.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1619674&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to