New submission from Michael Kesper:

Please look at 
http://stackoverflow.com/questions/41932287/how-can-i-create-a-loop-for-these-if-statements/41932494?noredirect=1#41932494
 

For beginners, it would be good to introduce the concepts of 'pythonic' dealing 
with sequences (iterators) and streams (generators) as soon as possible and 
everywhere where sequenceable data structures are discussed.

It is a common idiom in other languages to access members of sequences with 
counters, risking off-by-one errors or IndexErrors.

If beginners aren't introduced to the 'right' concepts soon enough, they might 
have a hard time figuring out the 'iterator' way.
Iterators should at least be mentioned in 
https://docs.python.org/3/tutorial/datastructures.html#looping-techniques.

----------
assignee: docs@python
components: Documentation
messages: 286480
nosy: docs@python, mkesper
priority: normal
severity: normal
status: open
title: Python Tutorial should introduce iterators and generators
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29390>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to