Van Ly added the comment:
The first mention of iterator should link to 'glossary.html#term-iterator'.
There is a builtin iter() function. This may cause confusion in earlier
suggested inline sample code.
-- Use the following inline sample code
-- in place of 'iter = enumerate(led)'to avoid confusion with iter() builtin:
led = ['red', 'green', 'blue']
iterator = enumerate(led)
try:
while True:
print iterator.next()
except StopIteration:
print 'End of iterator has been reached.'
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22725>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com