Message407811
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
``` |
|
Date |
User |
Action |
Args |
2021-12-06 14:18:22 | graingert | set | recipients:
+ graingert, ncoghlan, asvetlov, lukasz.langa, Dima.Tisnek, yselivanov |
2021-12-06 14:18:22 | graingert | set | messageid: <1638800302.87.0.584847308846.issue45996@roundup.psfhosted.org> |
2021-12-06 14:18:22 | graingert | link | issue45996 messages |
2021-12-06 14:18:22 | graingert | create | |
|