summaryrefslogtreecommitdiff
path: root/Lib/macpath.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-12-12 23:20:45 +0000
committerFred Drake <fdrake@acm.org>2000-12-12 23:20:45 +0000
commit78fa083216b120f65dbdbeef3377a047f1767fce (patch)
treeb052a231089044de42ba463eff511c4c91f8e220 /Lib/macpath.py
parentc453b1a3b80e329f815de2f728bf712d5c7fd295 (diff)
downloadcpython-78fa083216b120f65dbdbeef3377a047f1767fce.tar.gz
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.
Diffstat (limited to 'Lib/macpath.py')
-rw-r--r--Lib/macpath.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 12eec0c97e..bf2660f4f1 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -17,7 +17,7 @@ def isabs(s):
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 @@ def join(s, *p):
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 @@ def commonprefix(m):
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