[docs] [issue33774] Document that @lru_cache caches based on exactly how the function arguments are specified

Al-Scandar Solstag report at bugs.python.org
Wed Jun 6 09:48:39 EDT 2018

Al-Scandar Solstag <solstag at member.fsf.org> added the comment:

Hi Raymond, I think I understand what you mean, and would suggest something along the lines of:

Note that lru_cache only guarantees cache matches on the exact way function arguments are specified, so the following ways of calling 'def f(a, b=7)' are not guaranteed to cache each other: f(1), f(a=1), f(1, 7), f(1, b=7), f(a=1, b=7).


Python tracker <report at bugs.python.org>

More information about the docs mailing list