[Python-checkins] cpython: Eliminate duplicate link lookup. Minor cleanup.
raymond.hettinger
python-checkins at python.org
Fri Mar 16 19:21:46 CET 2012
http://hg.python.org/cpython/rev/6bccfd5ccfb0
changeset: 75749:6bccfd5ccfb0
user: Raymond Hettinger <python at rcn.com>
date: Fri Mar 16 11:21:39 2012 -0700
summary:
Eliminate duplicate link lookup. Minor cleanup.
files:
Lib/functools.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/functools.py b/Lib/functools.py
--- a/Lib/functools.py
+++ b/Lib/functools.py
@@ -191,11 +191,11 @@
key += tuple(map(type, args))
if kwds:
key += tuple(type(v) for k, v in sorted_items)
- PREV, NEXT = 0, 1 # names of link fields
+ PREV = 0 # names of link fields
+ NEXT = 1
with lock:
link = cache_get(key)
if link is not None:
- link = cache[key]
# record recent use of the key by moving it to the front of the list
link_prev, link_next, key, result = link
link_prev[NEXT] = link_next
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list