Nikita Sobolev <m...@sobolevn.me> added the comment:

I see several ways of solving this:
1. Make `lru_cache(typed=True)` to look into iterable internals. This might be 
slow. And very slow for large iterables. Maybe even infinite for infinite ones
2. Adapt `Literal` / possibly other types to be treated differently. Because, 
most of the time, `Literal` take a small amount of args

I am going to send a PR with the second option.

----------

_______________________________________
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

Reply via email to