Thomas Grainger <[email protected]> added the comment:
I think `AttributeError: args` is the desired/expected behaviour
consider the sync version:
```
import logging
from asyncio import sleep, gather, run
from contextlib import asynccontextmanager, contextmanager
@contextmanager
def foo():
yield
def test():
f = foo()
f.__enter__()
f.__enter__()
test()
```
```
Traceback (most recent call last):
File "/home/graingert/projects/example/sync.py", line 15, in <module>
test()
File "/home/graingert/projects/example/sync.py", line 13, in test
f.__enter__()
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
del self.args, self.kwds, self.func
AttributeError: args
```
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45996>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com