Message412985
> should not use asyncio directly but 'async def', 'await', and `inspect.iscoroutine()` / `inspect.iscoroutinefunction()` instead.
Hmm, this introduces some difficulties. Since a coroutine can only be awaited once, a new coroutine needs to be returned (that simply return the result when awaited) each time __get__ is called. But this means we need a way to somehow get the result in __get__. If there’s a separate `cached_property_async` it’s possible to make __get__ a coroutine function, but personally I’d prefer the interface to match the PyPI cached_property. |
|
Date |
User |
Action |
Args |
2022-02-10 09:23:17 | uranusjr | set | recipients:
+ uranusjr, rhettinger, asvetlov, yselivanov |
2022-02-10 09:23:17 | uranusjr | set | messageid: <1644484997.64.0.607393944456.issue46622@roundup.psfhosted.org> |
2022-02-10 09:23:17 | uranusjr | link | issue46622 messages |
2022-02-10 09:23:17 | uranusjr | create | |
|