[Python-checkins] cpython (3.5): Issue 24180: Document sys.(set|get)_coroutine_wrapper
yury.selivanov
python-checkins at python.org
Sun May 31 23:13:39 CEST 2015
https://hg.python.org/cpython/rev/3eb817e19090
changeset: 96430:3eb817e19090
branch: 3.5
parent: 96428:d8deabc8d39a
user: Yury Selivanov <yselivanov at sprymix.com>
date: Sun May 31 17:13:08 2015 -0400
summary:
Issue 24180: Document sys.(set|get)_coroutine_wrapper
files:
Doc/library/sys.rst | 34 +++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -576,6 +576,18 @@
*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 @@
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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list