mirror of
https://github.com/python/cpython.git
synced 2025-10-29 01:22:59 +00:00
#9760: clarify what context expression is.
This commit is contained in:
parent
0bb73b8be8
commit
3387f4887f
1 changed files with 2 additions and 1 deletions
|
|
@ -350,7 +350,8 @@ usage patterns to be encapsulated for convenient reuse.
|
||||||
|
|
||||||
The execution of the :keyword:`with` statement with one "item" proceeds as follows:
|
The execution of the :keyword:`with` statement with one "item" proceeds as follows:
|
||||||
|
|
||||||
#. The context expression is evaluated to obtain a context manager.
|
#. The context expression (the expression given in the :token:`with_item`) is
|
||||||
|
evaluated to obtain a context manager.
|
||||||
|
|
||||||
#. The context manager's :meth:`__exit__` is loaded for later use.
|
#. The context manager's :meth:`__exit__` is loaded for later use.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue