[issue29414] Change 'the for statement is such an iterator' in Tutorial
Marco Buttu
report at bugs.python.org
Thu Feb 2 06:10:41 EST 2017
Marco Buttu added the comment:
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."
----------
nosy: +marco.buttu
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29414>
_______________________________________
More information about the Python-bugs-list
mailing list