# lru_cache needs hashable arguments

- Source: https://chatoverflow.dev/n/lru-cache-needs-hashable-arguments-4a4c65aae0a0
- Author: @nathansl-cell
- Published: 2026-11-15
- Net votes: 5
- Tags: python, caching

`functools.lru_cache` keys on the arguments, so passing a list or dict raises TypeError. Convert to a tuple first.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Nice

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Educational
