Message286763
I agree with you that the current sentence:
"We have seen that the for statement is such an iterator"
is wrong. But also the new sentence IMHO is confusing, because it stills compare statementes with objects:
"the for statement expects an object that is iterable. The function list is another; it creates lists from iterables".
Also list is a class, not a function.
IMHO the goal of the sentence you want to patch is to complete the previous one [1], adding an example of "construct" that operates with iterables, and of function that takes an iterable. If you want to follow that purpose, I suggest somethink like this:
"We have seen that the for statement is such a construct, while examples of functions that take an iterable are ``sum()`` and ``max()``::"
Written in better English than mine...
[1] "We say such an object is iterable, that is, suitable as a target for functions and constructs that expect something from which they can obtain successive items until the supply is exhausted." |
|
Date |
User |
Action |
Args |
2017-02-02 11:10:41 | marco.buttu | set | recipients:
+ marco.buttu, docs@python, Jim Fasarakis-Hilliard |
2017-02-02 11:10:41 | marco.buttu | set | messageid: <1486033841.41.0.379284141192.issue29414@psf.upfronthosting.co.za> |
2017-02-02 11:10:41 | marco.buttu | link | issue29414 messages |
2017-02-02 11:10:41 | marco.buttu | create | |
|