Python iterators
15th June 2002
Via Daily Python-URL (which appears not to provide permalinks): Introduction to Python iterators. This is an extract from Deitel & Deitel’s “Python How To Program” and includes extensive code samples. Iterators are very cool—as I see it, they allow you to overload an object ready for use with Python’s powerful for ... in ... syntax (as well as other looping methods). This blog is implemented as an object in PHP—had I used Python I could display the whole blog using for entry in blog: print entry.
More recent articles
- The last six months in LLMs in five minutes - 19th May 2026
- Notes on the xAI/Anthropic data center deal - 7th May 2026
- Live blog: Code w/ Claude 2026 - 6th May 2026