pep-492: Update doc on set_coroutine_wrapper

This commit is contained in:
Yury Selivanov 2015-05-31 17:17:34 -04:00
parent 005aecce65
commit 6b69474c0a
1 changed files with 6 additions and 6 deletions

View File

@ -684,12 +684,12 @@ New Standard Library Functions
* ``inspect.isawaitable(obj)`` returns ``True`` if ``obj`` can be used * ``inspect.isawaitable(obj)`` returns ``True`` if ``obj`` can be used
in ``await`` expression. See `Await Expression`_ for details. in ``await`` expression. See `Await Expression`_ for details.
* ``sys.set_coroutine_wrapper(wrapper)`` allows to intercept creation * ``sys.set_coroutine_wrapper(wrapper)`` allows to intercept creation of
of *coroutine* objects. ``wrapper`` must be a callable that accepts *coroutine* objects. ``wrapper`` must be either a callable that
one argument: a *coroutine* object or ``None``. ``None`` resets the accepts one argument (a *coroutine* object), or ``None``. ``None``
wrapper. If called twice, the new wrapper replaces the previous one. resets the wrapper. If called twice, the new wrapper replaces the
The function is thread-specific. See `Debugging Features`_ for more previous one. The function is thread-specific. See `Debugging
details. Features`_ for more details.
* ``sys.get_coroutine_wrapper()`` returns the current wrapper object. * ``sys.get_coroutine_wrapper()`` returns the current wrapper object.
Returns ``None`` if no wrapper was set. The function is Returns ``None`` if no wrapper was set. The function is