New == syntax

This commit is contained in:
Guido van Rossum 1992-01-01 19:35:13 +00:00
parent 4d8e859e8f
commit bdfcfccbe5
73 changed files with 419 additions and 391 deletions

View file

@ -44,7 +44,7 @@ def forget(path):
def forget_prefix(prefix):
n = len(prefix)
for path in cache.keys():
if path[:n] = prefix:
if path[:n] == prefix:
del cache[path]
@ -52,16 +52,16 @@ def forget_prefix(prefix):
# entries in subdirectories.
#
def forget_dir(prefix):
if prefix[-1:] = '/' and prefix <> '/':
if prefix[-1:] == '/' and prefix <> '/':
prefix = prefix[:-1]
forget(prefix)
if prefix[-1:] <> '/':
prefix = prefix + '/'
n = len(prefix)
for path in cache.keys():
if path[:n] = prefix:
if path[:n] == prefix:
rest = path[n:]
if rest[-1:] = '/': rest = rest[:-1]
if rest[-1:] == '/': rest = rest[:-1]
if '/' not in rest:
del cache[path]