Kaydet (Commit) a9832bc5 authored tarafından Guido van Rossum's avatar Guido van Rossum

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

Noted by Fredrik Lundh.
(Note -- this module is pretty silly.)
üst 605b93de
...@@ -26,7 +26,7 @@ def cmp(f1, f2): # Compare two files, use the cache if possible. ...@@ -26,7 +26,7 @@ def cmp(f1, f2): # Compare two files, use the cache if possible.
# types or sizes differ -- report different # types or sizes differ -- report different
return 0 return 0
# same type and size -- look in the cache # same type and size -- look in the cache
key = f1 + ' ' + f2 key = (f1, f2)
try: try:
cs1, cs2, outcome = cache[key] cs1, cs2, outcome = cache[key]
# cache hit # cache hit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment