From: Guido van Rossum Date: Wed, 21 Oct 1998 15:23:52 +0000 (+0000) Subject: Use (f1, f2) as cache key instead of f1 + ' ' + f2. X-Git-Tag: v1.5.2b1~290 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9832bc5721fe218f86a2a8165830646663352f3;p=python Use (f1, f2) as cache key instead of f1 + ' ' + f2. Noted by Fredrik Lundh. (Note -- this module is pretty silly.) --- diff --git a/Lib/cmp.py b/Lib/cmp.py index 4ebdfc60a2..69e6e272c6 100644 --- a/Lib/cmp.py +++ b/Lib/cmp.py @@ -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