June 2017
Beginner to intermediate
274 pages
6h 49m
English
We can also write context managers by adding __enter__ and __exit__ methods to objects. Any object that properly implements these methods can be used as a context manager, which is how objects such as open files and database connections are able to work extra as context managers.
Read now
Unlock full access