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 serhiy.storchaka
Recipients gvanrossum, kj, rhettinger, serhiy.storchaka, sobolevn, vanburgerberg
Date 2021-10-30.17:23:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635614596.29.0.846970170317.issue45679@roundup.psfhosted.org>
In-reply-to
Content
I agree. lru_cache(typed=True) itself should not look into iterable internals. It would be not only slow, but a change of semantic.

The simplest way to solve this issue is to remove caching of __getitem__(). The more sophisticated way is to move caching to lower level and apply it to a function with a var-positional parameter.
History
Date User Action Args
2021-10-30 17:23:16serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, rhettinger, sobolevn, kj, vanburgerberg
2021-10-30 17:23:16serhiy.storchakasetmessageid: <1635614596.29.0.846970170317.issue45679@roundup.psfhosted.org>
2021-10-30 17:23:16serhiy.storchakalinkissue45679 messages
2021-10-30 17:23:16serhiy.storchakacreate