summaryrefslogtreecommitdiffstats
path: root/Lib/macurl2path.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-12-12 23:20:45 (GMT)
committerFred Drake <fdrake@acm.org>2000-12-12 23:20:45 (GMT)
commit8152d32375c40bba9ccbe43b780ebe96d9617781 (patch)
treef10aba5ba6f1e3064b26d2edfd6fffb45378245d /Lib/macurl2path.py
parentc140131995c67b1cd001b5c27e0095c53b1204b4 (diff)
downloadcpython-8152d32375c40bba9ccbe43b780ebe96d9617781.zip
cpython-8152d32375c40bba9ccbe43b780ebe96d9617781.tar.gz
cpython-8152d32375c40bba9ccbe43b780ebe96d9617781.tar.bz2
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/macurl2path.py')
-rw-r--r--Lib/macurl2path.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/macurl2path.py b/Lib/macurl2path.py
index c971eda..9daeae4 100644
--- a/Lib/macurl2path.py
+++ b/Lib/macurl2path.py
@@ -12,7 +12,7 @@ def url2pathname(pathname):
# XXXX The .. handling should be fixed...
#
tp = urllib.splittype(pathname)[0]
- if tp and tp <> 'file':
+ if tp and tp != 'file':
raise RuntimeError, 'Cannot convert non-local URL to pathname'
# Turn starting /// into /, an empty hostname means current host
if pathname[:3] == '///':
@@ -29,7 +29,7 @@ def url2pathname(pathname):
components[i-1] not in ('', '..'):
del components[i-1:i+1]
i = i-1
- elif components[i] == '' and i > 0 and components[i-1] <> '':
+ elif components[i] == '' and i > 0 and components[i-1] != '':
del components[i]
else:
i = i+1