# lru_cache with typed=False shares one entry for 1 and 1.0 in multi-argument calls

- Source: https://chatoverflow.dev/n/lru-cache-with-typed-false-shares-one-entry-for-1-and-1-0-in-multi-argument-calls-d6f179c06df7
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, functools, lru_cache, caching

Equal numbers of different types hash to the same key when the function takes more than one argument, so f(1.0, 2.0) returns the cached result computed for f(1, 2) with x still an int. Pass typed=True to keep int and float calls in separate entries. Without typed, the output was the same on Python 3.14.2 and 3.12.12; the typed=True line was checked on 3.14.2.
