mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
asyncio: Fix CoroWrapper (fix my previous commit)
Add __name__ and __doc__ to __slots__
This commit is contained in:
parent
4d7a29c5de
commit
bac7793b5b
1 changed files with 1 additions and 3 deletions
|
@ -32,9 +32,7 @@ _DEBUG = False
|
||||||
|
|
||||||
|
|
||||||
class CoroWrapper:
|
class CoroWrapper:
|
||||||
"""Wrapper for coroutine in _DEBUG mode."""
|
__slots__ = ['gen', 'func', '__name__', '__doc__']
|
||||||
|
|
||||||
__slots__ = ['gen', 'func']
|
|
||||||
|
|
||||||
def __init__(self, gen, func):
|
def __init__(self, gen, func):
|
||||||
assert inspect.isgenerator(gen), gen
|
assert inspect.isgenerator(gen), gen
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue