This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author John Belmonte
Recipients John Belmonte
Date 2019-06-25.06:50:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561445403.56.0.10750759042.issue37398@roundup.psfhosted.org>
In-reply-to
Content
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().
History
Date User Action Args
2019-06-25 06:50:03John Belmontesetrecipients: + John Belmonte
2019-06-25 06:50:03John Belmontesetmessageid: <1561445403.56.0.10750759042.issue37398@roundup.psfhosted.org>
2019-06-25 06:50:03John Belmontelinkissue37398 messages
2019-06-25 06:50:03John Belmontecreate