[Python-checkins] peps: pep-0492: Fix example in Debugging Features section

yury.selivanov python-checkins at python.org
Thu Apr 23 22:25:33 CEST 2015


https://hg.python.org/peps/rev/73836bbcba5f
changeset:   5795:73836bbcba5f
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Thu Apr 23 16:25:30 2015 -0400
summary:
  pep-0492: Fix example in Debugging Features section

files:
  pep-0492.txt |  8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/pep-0492.txt b/pep-0492.txt
--- a/pep-0492.txt
+++ b/pep-0492.txt
@@ -466,18 +466,18 @@
         await asyncio.sleep(1)
 
     def async_debug_wrap(generator):
-        return asyncio.AsyncDebugWrapper(generator)
+        return asyncio.CoroWrapper(generator)
 
     sys.set_coroutine_wrapper(async_debug_wrap)
 
     debug_me()  # <- this line will likely GC the coroutine object and
-                # trigger AsyncDebugWrapper's code.
+                # trigger asyncio.CoroWrapper's code.
 
-    assert isinstance(debug_me(), AsyncDebugWrapper)
+    assert isinstance(debug_me(), asyncio.CoroWrapper)
 
     sys.set_coroutine_wrapper(None) # <- this unsets any
                                     #    previously set wrapper
-    assert not isinstance(debug_me(), AsyncDebugWrapper)
+    assert not isinstance(debug_me(), asyncio.CoroWrapper)
 
 If ``sys.set_coroutine_wrapper()`` is called twice, the new wrapper
 replaces the previous wrapper.  ``sys.set_coroutine_wrapper(None)``

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list