Message346485
A case came up where I'd like a non-async context manager to be able to decorate both regular and async functions. I wonder why contextlib.ContextDecorator doesn't just support both cases.
The implementation seems straightforward, switching on iscoroutinefunction(). |
|
Date |
User |
Action |
Args |
2019-06-25 06:50:03 | John Belmonte | set | recipients:
+ John Belmonte |
2019-06-25 06:50:03 | John Belmonte | set | messageid: <1561445403.56.0.10750759042.issue37398@roundup.psfhosted.org> |
2019-06-25 06:50:03 | John Belmonte | link | issue37398 messages |
2019-06-25 06:50:03 | John Belmonte | create | |
|