Staging: this is not the live site, pydocs.org.
Enters the supplied context manager.
If successful, also pushes its __exit__ method as a callback and
returns the result of the __enter__ method.
Changed in 3.11, 3.15
- 3.11: Raises TypeError instead of AttributeError if cm is not a context manager.
- 3.15: Added support for arbitrary descriptors __enter__() and __exit__().