Hacker News new | ask | show | jobs
by andreareina 2186 days 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.
1 comments

What approach are you using to efficiently store and look up non-hashable function arguments?
Converting to tuple has mostly been enough. I want to say always, but I don't trust my memory that much, haha.