This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mkesper
Recipients docs@python, mkesper
Date 2017-01-30.10:05:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485770709.65.0.205484403801.issue29390@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-01-30 10:05:10mkespersetrecipients: + mkesper, docs@python
2017-01-30 10:05:09mkespersetmessageid: <1485770709.65.0.205484403801.issue29390@psf.upfronthosting.co.za>
2017-01-30 10:05:09mkesperlinkissue29390 messages
2017-01-30 10:05:09mkespercreate