Skip to content

Glossary: Software Design Patterns

Context manager

Also written: with statement

An object used with `with` that sets something up and always cleans up afterward, like `with open(...)`, which opens and closes a file.

Where the book teaches it

Related terms

Template method