Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore Python's iteration protocol in depth through this 32-minute EuroPython Conference talk. Delve into the inner workings of for loops and list comprehensions, understanding the crucial differences between iterators and iterables. Learn how to create custom iterables and iterators, and discover how Python manages state during iteration. Through live coding demonstrations, gain insights into the implementation of getitem, iter, and next methods. Enhance your Python skills by mastering the iteration protocol, enabling you to reason more effectively about existing objects and create your own iterables and iterators. Perfect for developing Pythonistas looking to deepen their understanding of this fundamental concept.
Syllabus
Introduction
Dave Beasley
Types of Iteration
Python 11 Documentation
C for loop
Pythonic
Iteration Protocol
Iterable
Inner function
Checking for iteration
Making iterable
Writing iterable
Getting an iterator
Behind the scenes
Recap
What is next
What is iterator
How to use iterator
Counting iterators
Advances
Repeat
Trick
Running out of time
Taught by
EuroPython Conference