]> granicus.if.org Git - python/commitdiff
Merge
authorRaymond Hettinger <python@rcn.com>
Mon, 4 Mar 2013 09:20:46 +0000 (04:20 -0500)
committerRaymond Hettinger <python@rcn.com>
Mon, 4 Mar 2013 09:20:46 +0000 (04:20 -0500)
1  2 
Lib/functools.py

index 02bff42bd3f347abf0bec359a2ede5730b3d5918,ba6f9cd5d4ab3da5b3056468d5049960f1341f91..9846a557608685b0fbae49b7a9eb44c2dc2114a3
@@@ -308,7 -284,8 +308,7 @@@ def lru_cache(maxsize=128, typed=False)
                          last = root[PREV]
                          link = [last, root, key, result]
                          last[NEXT] = root[PREV] = cache[key] = link
-                         full = (len(cache) == maxsize)
 -                        currsize += 1
 -                        full = (currsize >= maxsize)
++                        full = (len(cache) >= maxsize)
                      misses += 1
                  return result