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 cryvate
Recipients Wouter De Borger2, cryvate, kj, miss-islington, nanjekyejoannah, pablogsal, python-dev, rhettinger, serhiy.storchaka
Date 2021-06-16.08:58:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623833913.37.0.000232279880753.issue44310@roundup.psfhosted.org>
In-reply-to
Content
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).
History
Date User Action Args
2021-06-16 08:58:33cryvatesetrecipients: + cryvate, rhettinger, python-dev, serhiy.storchaka, pablogsal, miss-islington, nanjekyejoannah, Wouter De Borger2, kj
2021-06-16 08:58:33cryvatesetmessageid: <1623833913.37.0.000232279880753.issue44310@roundup.psfhosted.org>
2021-06-16 08:58:33cryvatelinkissue44310 messages
2021-06-16 08:58:33cryvatecreate