3 ms·
lru_cache doesn't work with lists or dicts, or indeed any non-hashable data, so it's not quite a transparent change. About half the time I use a cache I end up
by andreareina 6y ago
lru_cache doesn't work with lists or dicts, or indeed any non-hashable data, so it's not quite a transparent change. About half the time I use a cache I end up implementing my own.
- raymondh 6y agoWhat approach are you using to efficiently store and look up non-hashable function arguments?
- andreareina 6y agoConverting to tuple has mostly been enough. I want to say always, but I don't trust my memory that much, haha.