[issue35040] functools.lru_cache does not work with coroutines

Andrew Svetlov report at bugs.python.org
Mon Oct 22 02:33:07 EDT 2018


Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:

A coroutine detection is a relatively slow check.
I don't think we need to do it in `functools.lru_cache`.

There is a specialized asyncio compatible version: https://github.com/aio-libs/async_lru
Please use it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35040>
_______________________________________


More information about the Python-bugs-list mailing list