Henk-Jaap Wagenaar <wagenaarhenkj...@gmail.com> added the comment:
PR 26731 looks very good to me. My only comment, which I am not sure is worthy of adding/is a general lru_cache thing, that "instances are kept alive until they age out of the cache or until the cache is cleared", if you are creating instances and calling this method all the time, will lead to an infinite memory leak. Not sure whether that's too specific to the problem we encountered and we are all consenting adults and should infer this or it is helpful: leave it up to your/other people's judgement. P.S. In the programming.rst there is also the "Why are default values shared between objects?" section which actually uses default values to make its own poor version of a cache. It should probably at least mention lru_cache could be used (unless you particularly need callers to be able to pass their own cache). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44310> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com