mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue 24180: Document sys.(set|get)_coroutine_wrapper
(Merge 3.5)
This commit is contained in:
commit
126e02604f
1 changed files with 34 additions and 0 deletions
|
@ -576,6 +576,18 @@ always available.
|
|||
*service_pack_major*, *suite_mask*, and *product_type*.
|
||||
|
||||
|
||||
.. function:: get_coroutine_wrapper()
|
||||
|
||||
Returns ``None``, or a wrapper set by :func:`set_coroutine_wrapper`.
|
||||
|
||||
.. versionadded:: 3.5
|
||||
See :pep:`492` for more details.
|
||||
|
||||
.. note::
|
||||
This function has been added on a provisional basis (see :pep:`411`
|
||||
for details.) Use it only for debug purposes.
|
||||
|
||||
|
||||
.. data:: hash_info
|
||||
|
||||
A :term:`struct sequence` giving parameters of the numeric hash
|
||||
|
@ -1061,6 +1073,28 @@ always available.
|
|||
thus not likely to be implemented elsewhere.
|
||||
|
||||
|
||||
.. function:: set_coroutine_wrapper(wrapper)
|
||||
|
||||
Allows to intercept creation of :term:`coroutine` objects.
|
||||
|
||||
*wrapper* must be either:
|
||||
|
||||
* a callable that accepts one argument (a coroutine object);
|
||||
* ``None``, to reset the wrapper.
|
||||
|
||||
If called twice, the new wrapper replaces the previous one. The function
|
||||
is thread-specific.
|
||||
|
||||
See also :func:`get_coroutine_wrapper`.
|
||||
|
||||
.. versionadded:: 3.5
|
||||
See :pep:`492` for more details.
|
||||
|
||||
.. note::
|
||||
This function has been added on a provisional basis (see :pep:`411`
|
||||
for details.) Use it only for debug purposes.
|
||||
|
||||
|
||||
.. data:: stdin
|
||||
stdout
|
||||
stderr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue