Use (f1, f2) as cache key instead of f1 + ' ' + f2.

Noted by Fredrik Lundh.
(Note -- this module is pretty silly.)
This commit is contained in:
Guido van Rossum 1998-10-21 15:23:52 +00:00
parent 605b93dee2
commit a9832bc572

View 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