Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e8c817 commit d37fb55Copy full SHA for d37fb55
1 file changed
Lib/functools.py
@@ -175,8 +175,8 @@ def wrapper(*args, **kwds):
175
# simple caching without ordering or size limit
176
nonlocal hits, misses
177
key = make_key(args, kwds, typed) if kwds or typed else args
178
- result = cache_get(key)
179
- if result is not None:
+ result = cache_get(key, root) # root used here as a unique not-found sentinel
+ if result is not root:
180
hits += 1
181
return result
182
result = user_function(*args, **kwds)
0 commit comments