diff Lib/statcache.py @ 15543:785155e2cfca legacy-trunk

Update the code to better reflect recommended style: Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
author Fred Drake <fdrake@acm.org>
date Tue, 12 Dec 2000 23:20:45 +0000
parents 4a23cc49e2b0
children 3685ef2a55a4
line wrap: on
line diff
--- a/Lib/statcache.py	Tue Dec 12 23:16:51 2000 +0000
+++ b/Lib/statcache.py	Tue Dec 12 23:20:45 2000 +0000
@@ -43,10 +43,10 @@
 def forget_dir(prefix):
 	"""Forget about a directory and all entries in it, but not about
 	entries in subdirectories."""
-	if prefix[-1:] == '/' and prefix <> '/':
+	if prefix[-1:] == '/' and prefix != '/':
 		prefix = prefix[:-1]
 	forget(prefix)
-	if prefix[-1:] <> '/':
+	if prefix[-1:] != '/':
 		prefix = prefix + '/'
 	n = len(prefix)
 	for path in cache.keys():
@@ -62,7 +62,7 @@
 	Normally used with prefix = '/' after a chdir()."""
 	n = len(prefix)
 	for path in cache.keys():
-		if path[:n] <> prefix:
+		if path[:n] != prefix:
 			del cache[path]