On Mon, Dec 21, 2020 at 9:25 AM Christopher Barker <python...@gmail.com>
wrote:

> [Mathew Elman wrote:]
>
>> Surely what you're looking for is some kind of typed hash table?
>
>
> Maybe, maybe not. My impression is that the Typed hash  table is a kluge
> to get around this one issue.
>

For what it's worth, functools.lru_cache has a "typed" option that
effectively adds the type()s of the arguments to the cache key. It was
added by https://bugs.python.org/issue13227 . The only application of it in
that patch was to re's compiled pattern cache, which needs to be typed to
avoid spurious warnings or errors with -b or -bb, I suppose.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/LJZX66JTCVWJHDMX272Z4KPCK7RQEIRO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to