Message229994
| Author |
vy0123 |
| Recipients |
docs@python, ethan.furman, ezio.melotti, georg.brandl, r.david.murray, vy0123 |
| Date |
2014年10月25日.11:20:00 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1414236000.52.0.745007575016.issue22725@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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.' |
|