Nikita Sobolev <[email protected]> added the comment:
This happens to all `lru_cache` calls, where we deal with container types.
Example:
```
from functools import lru_cache
@lru_cache(typed=True)
def test(arg):
return str(arg)
print(test((1, 'a'))) # (1, 'a')
print(test((True, 'a'))) # (1, 'a')
```
Moveover, this behavior is not tested in `test_functools`:
https://github.com/python/cpython/blame/aae18a17401dc36917c0f64f971d60ab1a5b477e/Lib/test/test_functools.py#L1482-L1496
Original issue: https://bugs.python.org/issue13227
Original commit:
https://github.com/python/cpython/commit/cd9fdfd652cdaca959b1c5d4cddf60d90a331b47
----------
nosy: +gvanrossum, kj, rhettinger, sobolevn
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45679>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com