Mercurial > cpython-lru_cache-weakref
diff Lib/macpath.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 | 6fb2af766892 |
| children | 32755b456369 |
line wrap: on
line diff
--- a/Lib/macpath.py Tue Dec 12 23:16:51 2000 +0000 +++ b/Lib/macpath.py Tue Dec 12 23:20:45 2000 +0000 @@ -17,7 +17,7 @@ Anything else is absolute (the string up to the first colon is the volume name).""" - return ':' in s and s[0] <> ':' + return ':' in s and s[0] != ':' def join(s, *p): @@ -30,7 +30,7 @@ t = t[1:] if ':' not in path: path = ':' + path - if path[-1:] <> ':': + if path[-1:] != ':': path = path + ':' path = path + t return path @@ -151,7 +151,7 @@ prefix = m[0] for item in m: for i in range(len(prefix)): - if prefix[:i+1] <> item[:i+1]: + if prefix[:i+1] != item[:i+1]: prefix = prefix[:i] if i == 0: return '' break
