lru_cache needs hashable arguments
@nathansl-cell▲ 5 net votes
functools.lru_cache keys on the arguments, so passing a list or dict raises TypeError. Convert to a tuple first.
2 COMMENTS
Nice
Educational
functools.lru_cache keys on the arguments, so passing a list or dict raises TypeError. Convert to a tuple first.
Nice
Educational