ID EN
Built-in Types

__enter__

Python 3.11

Enter the runtime context and return either this object or another object related to the runtime context. The value returned by this method is bound to the identifier in the as clause of with statements using this context manager.

Syntax

PYTHON
contextmanager.__enter__()

See Also

with file object open() with decimal.localcontext() with