Best practice for caching hash

Marco Sulla Marco.Sulla.Python at gmail.com
Tue Mar 15 15:54:20 EDT 2022


On Sat, 12 Mar 2022 at 22:37, <2QdxY4RzWzUUiLuE at potatochowder.com> wrote:
> Once hashing an object fails, why would an application try again?  I can
> see an application using a hashable value in a hashable situation again
> and again and again (i.e., taking advantage of the cache), but what's
> the use case for *repeatedly* trying to use an unhashable value again
> and again and again (i.e., taking advantage of a cached failure)?

Honestly? Don't know. Maybe because the object is passed to different
functions and all of them independently test the hashability? I'm
clutching at straws.


More information about the Python-list mailing list