Python 3: Deep Dive (Part 2)

icon
Course Description

Part 2 of this Python 3: Deep Dive series is an in-depth look at:sequencesiterablesiteratorsgeneratorscomprehensionscontext managersgenerator based coroutinesI will show you exactly how iteration works in Python - from the sequence protocol, to the iterable and iterator protocols, and how we can write our own sequence and iterable data types.We'll go into some detail to explain sequence slicing and how slicing relates to ranges.We look at comprehensions in detail as well and I will show you how list comprehensions are actually closures and have their own scope, and the reason why subtle bugs sometimes creep in to list comprehensions that we might not expect.We'll take a deep dive into the itertools module and look at all the functions available there and how useful (but overlooked!) they can be.We also look at generator functions, their relation to iterators, and their comprehension counterparts (generator expressions).Context managers, an often overlooked construct in Python, is covered in detail too. There we will learn how to create and leverage our own context managers and understand the relationship between context managers and generator functions.Finally, we'll look at how we can use generators to create coroutines.Each section is followed by a project designed to put into practice what you learn throughout the course.This course series is focused on the Python language and the standard library. There is an enormous amount of functionality and things to understand in just the standard CPython distribution, so I do not cover 3rd party libraries - this is a Python deep dive, not an exploration of the many highly useful 3rd party libraries that have grown around Python - those are often sufficiently large to warrant an entire course unto themselves! Indeed, many of them already do!

icon
Reviews

0

0 total reviews

5 star 4 star 3 star 2 star 1 star
0% Complete
0% Complete
0% Complete
0% Complete
0% Complete
0% 0% 0% 0% 0%