[issue44992] functools.lru_cache does not guarantee cache hits for equal values

2021-08-24 Thread Brian Lee
Brian Lee added the comment: Thanks for clarifying - I see now that the docs specifically call out the lack of guarantees here with "usually but not always regard them as equivalent". I did want to specifically explain the context of my bug; 1. NumPy's strings have some unex

[issue44992] functools.lru_cache does not consider strings and numpy strings as equivalent

2021-08-24 Thread Brian Lee
New submission from Brian Lee : This seems like unexpected behavior: Two keys that are equal and have equal hashes should yield cache hits, but they do not. Python 3.9.6 (default, Aug 18 2021, 19:38:01) [GCC 7.5.0] :: Anaconda, Inc. on linux Type "help", "copyright", &