Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
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. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45679> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com