diff Lib/cmp.py @ 9423:e1806b280f53 legacy-trunk

Use (f1, f2) as cache key instead of f1 + ' ' + f2. Noted by Fredrik Lundh. (Note -- this module is pretty silly.)
author Guido van Rossum <guido@python.org>
date Wed, 21 Oct 1998 15:23:52 +0000
parents 3ba17305f047
children 222aee96dc42
line wrap: on
line diff
--- a/Lib/cmp.py	Wed Oct 21 15:08:40 1998 +0000
+++ b/Lib/cmp.py	Wed Oct 21 15:23:52 1998 +0000
@@ -26,7 +26,7 @@
 		# 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