Python Context Managers and the
Dan Bader
12:07
Description
Python’s with statement is powered by a language feature called context managers. It helps you simplify some common resource management patterns by abstracting their functionality and allowing them to be factored out and reused.
In this course you’ll learn how context managers and the with statement work in Python, including the difference between class-based and function-based context managers, as well as some other tricks that will make you a more efficient Python developer.
More details
User Reviews
Rating
Dan Bader
Instructor's CoursesDan Bader is the owner and editor in chief of Real Python and the main developer of the realpython.com learning platform. Dan has been writing code for more than 20 years and holds a master’s degree in computer science. He’s the author of Python Tricks, a best selling programming book for intermediate Python developers.
Hey, I’m Dan Bader and I help Python developers take their coding skills and productivity to the next level. I’m an independent software engineer, author, and speaker. I’ve been writing code for more than two decades—and I’d love to help you become a more proficient Python coder.
Here’s where you can find me elsewhere on the web:
I’ve also done some podcast interviews and other media appearances you can check out:

Real Python
View courses Real Python- language english
- Training sessions 6
- duration 12:07
- Release Date 2023/01/05