[issue29414] Change 'the for statement is such an iterator' in Tutorial

Marco Buttu report at bugs.python.org
Tue Feb 28 16:46:36 EST 2017


Marco Buttu added the comment:

Wolfgang, thanks for your contribution. However, I prefere the chapter as it currently is, because IMHO it introduces the concepts more gradually than your proposal. In addition the modification of the title section from "for Statements" to "for Loops" IMHO makes the title not consistent with the other section titles.

> - I don't think range() really deserves its own section
> in a chapter about control flow, so I removed most of it
> and linked to the relevant stdtypes section instead

-1 for me: the range() function is used in several examples in the chapter, that is why IMHO it is worth having the range() section as it is now.

> - moved the definition of an iterable up into the for
> loop section

-1 for me: IMHO the current definition/introdution of iterable is easier to understand for a beginner.

> - restructured the for loop section to discuss Python for loops
> first and only compare them to Pascal/C afterwards

+0. I think for a reader who is coming from another language is better to have the current introduction. But maybe it is not the same for a reader who is learning Python as a first programming language.

> - moved the example for modifying a list while iterating
> over it to the datastructures chapter

+0

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29414>
_______________________________________


More information about the Python-bugs-list mailing list