pep-550: Clarify ExecutionContext.run() (#335)

This commit is contained in:
Yury Selivanov 2017-08-11 22:16:34 -04:00 committed by GitHub
parent f90860ed1a
commit c46c5a33fb
1 changed files with 10 additions and 1 deletions

View File

@ -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.