]> granicus.if.org Git - python/commitdiff
Use (f1, f2) as cache key instead of f1 + ' ' + f2.
authorGuido van Rossum <guido@python.org>
Wed, 21 Oct 1998 15:23:52 +0000 (15:23 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 21 Oct 1998 15:23:52 +0000 (15:23 +0000)
Noted by Fredrik Lundh.
(Note -- this module is pretty silly.)

Lib/cmp.py

index 4ebdfc60a278ae8b6895cb73e5b0fda0694995de..69e6e272c6069c2167e422324c20792f3626cd81 100644 (file)
@@ -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