[issue8376] Tutorial offers dangerous advice about iterators: “__iter__() can just return self”

2016-10-17 Thread loic rowe
loic rowe added the comment: A new proposal is to add at the end of the paragraph on the iterator those point: """ As you should have noticed this Reverse let you iterate over the data only once:: >>> rev = Reverse('spam') >>> for char in rev:

[issue8376] Tutorial offers dangerous advice about iterators: “__iter__() can just return self”

2016-10-14 Thread loic rowe
loic rowe added the comment: I don't disapprove the proposal on the need to have an explanation on the difference between a container and an iterator. But I was unable to found in the documentation a proper definition of a container. -- ___ Python