mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
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:
parent
605b93dee2
commit
a9832bc572
1 changed files with 1 additions and 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue