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/!
На этой странице сайта вы можете посмотреть видео онлайн Inside Python generators длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Python and Pandas with Reuven Lerner 01 Апрель 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 994 раз и оно понравилось 69 зрителям. Приятного просмотра!