contextlib

E431930

contextlib is a Python standard library module that provides utilities for working with context managers and the with statement, simplifying resource management and cleanup.

Try in SPARQL Jump to: Surface forms Statements Referenced by

All labels observed (1)

Label Occurrences
contextlib canonical 1

Statements (45)

Predicate Object
instanceOf Python standard library module
availableIn CPython NERFINISHED
PyPy NERFINISHED
other Python implementations compatible with the standard library
category context manager utilities
resource management utilities
defines AbstractAsyncContextManager
AbstractContextManager NERFINISHED
AsyncExitStack NERFINISHED
ContextDecorator
ExitStack NERFINISHED
aclosing
closing
contextmanager
nested
nullcontext
redirect_stderr
redirect_stdout
suppress
documentedIn Python Standard Library documentation NERFINISHED
hasSubmodule contextlib.ExitStack NERFINISHED
contextlib.contextmanager
importSyntax import contextlib
introducedInVersion Python 2.5 NERFINISHED
license Python Software Foundation License NERFINISHED
maintainedBy Python core developers NERFINISHED
modulePath Lib/contextlib.py
partOf Python standard library NERFINISHED
PEPReference PEP 343 NERFINISHED
programmingLanguage Python
provides utilities for working with context managers
relatedTo context managers
with statement
simplifies cleanup of resources
resource management
stable true
supports asynchronous context managers
synchronous context managers
with statement
usedFor creating context managers using generator syntax
managing multiple context managers dynamically
suppressing specified exceptions
temporarily redirecting standard error
temporarily redirecting standard output
wrapping callables as context managers

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.