diff options
author | Guido van Rossum <guido@python.org> | 1998-10-21 15:23:52 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-10-21 15:23:52 (GMT) |
commit | a9832bc5721fe218f86a2a8165830646663352f3 (patch) | |
tree | 12a5641143cf0565c729fc44c16237be4b73dcb6 /Lib/cmp.py | |
parent | 605b93dee2b51189e2afb3754f5fadc092af15be (diff) | |
download | cpython-a9832bc5721fe218f86a2a8165830646663352f3.zip cpython-a9832bc5721fe218f86a2a8165830646663352f3.tar.gz cpython-a9832bc5721fe218f86a2a8165830646663352f3.tar.bz2 |
Use (f1, f2) as cache key instead of f1 + ' ' + f2.
Noted by Fredrik Lundh.
(Note -- this module is pretty silly.)
Diffstat (limited to 'Lib/cmp.py')
-rw-r--r-- | Lib/cmp.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -26,7 +26,7 @@ def cmp(f1, f2): # Compare two files, use the cache if possible. # types or sizes differ -- report different return 0 # same type and size -- look in the cache - key = f1 + ' ' + f2 + key = (f1, f2) try: cs1, cs2, outcome = cache[key] # cache hit |