When we use "yield" in a generator function, we tell the generator to go to sleep until our next iteration. But how does it know where it left off? How does it keep track of its internal state? In this video, I show you the internals of generators, and how Python uses built-in data structures to keep track of things.
You can get the Jupyter notebook for this video at https://github.com/reuven/YouTube-not... .
And don't forget that you can get my free, weekly "Better developers" newsletter at https://BetterDevelopersWeekly.com/!
Sur cette page du site, vous pouvez voir la vidéo en ligne Inside Python generators durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Python and Pandas with Reuven Lerner 01 avril 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 994 fois et il a aimé 69 téléspectateurs. Bon visionnage!