diff options
author | Fred Drake <fdrake@acm.org> | 2000-12-12 23:20:45 +0000 |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-12-12 23:20:45 +0000 |
commit | 78fa083216b120f65dbdbeef3377a047f1767fce (patch) | |
tree | b052a231089044de42ba463eff511c4c91f8e220 /Lib/mailcap.py | |
parent | c453b1a3b80e329f815de2f728bf712d5c7fd295 (diff) | |
download | cpython-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/mailcap.py')
-rw-r--r-- | Lib/mailcap.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/mailcap.py b/Lib/mailcap.py index 636f2dd244..9756594cb8 100644 --- a/Lib/mailcap.py +++ b/Lib/mailcap.py @@ -173,7 +173,7 @@ def subst(field, MIMEtype, filename, plist=[]): i, n = 0, len(field) while i < n: c = field[i]; i = i+1 - if c <> '%': + if c != '%': if c == '\\': c = field[i:i+1]; i = i+1 res = res + c @@ -187,7 +187,7 @@ def subst(field, MIMEtype, filename, plist=[]): res = res + MIMEtype elif c == '{': start = i - while i < n and field[i] <> '}': + while i < n and field[i] != '}': i = i+1 name = field[start:i] i = i+1 |