mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
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.
This commit is contained in:
parent
c140131995
commit
8152d32375
36 changed files with 101 additions and 99 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue