mirror of https://github.com/python/cpython
asyncio: Fix CoroWrapper (fix my previous commit)
Add __name__ and __doc__ to __slots__
This commit is contained in:
parent
4d7a29c5de
commit
bac7793b5b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue