]> granicus.if.org Git - python/commitdiff
asyncio: Fix CoroWrapper (fix my previous commit)
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 16 Jan 2014 00:55:29 +0000 (01:55 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 16 Jan 2014 00:55:29 +0000 (01:55 +0100)
Add __name__ and __doc__ to __slots__

Lib/asyncio/tasks.py

index 36404687a5717483759fa8ded7060b931d375c76..ec04d2f6fa505d303682b4b7be926db6c66cf6a8 100644 (file)
@@ -32,9 +32,7 @@ _DEBUG = False
 
 
 class CoroWrapper:
-    """Wrapper for coroutine in _DEBUG mode."""
-
-    __slots__ = ['gen', 'func']
+    __slots__ = ['gen', 'func', '__name__', '__doc__']
 
     def __init__(self, gen, func):
         assert inspect.isgenerator(gen), gen