pep-550: Clarify ExecutionContext.run() (#335)
This commit is contained in:
parent
f90860ed1a
commit
c46c5a33fb
11
pep-0550.rst
11
pep-0550.rst
|
@ -558,7 +558,16 @@ Python
|
|||
context.
|
||||
|
||||
* ``ec.run(func, *args)`` method: run ``func(*args)`` in the
|
||||
``ec`` execution context.
|
||||
``ec`` execution context. Any changes to the Execution Context
|
||||
performed by ``func`` will not be visible outside of the
|
||||
``run()`` call, nor will affect the ``ec`` itself. In other
|
||||
words, it's safe to do the following::
|
||||
|
||||
ec.run(func1)
|
||||
ec.run(func2)
|
||||
|
||||
both ``func1`` and ``func2`` will be executed in the same
|
||||
Execution Context.
|
||||
|
||||
* ``ec[key]``: lookup ``key`` in ``ec`` context.
|
||||
|
||||
|
|
Loading…
Reference in New Issue