mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +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
|
@ -13,7 +13,7 @@ def get_long_be(s):
|
|||
|
||||
def gethdr(fp):
|
||||
"""Read a sound header from an open file."""
|
||||
if fp.read(4) <> MAGIC:
|
||||
if fp.read(4) != MAGIC:
|
||||
raise error, 'gethdr: bad magic word'
|
||||
hdr_size = get_long_be(fp.read(4))
|
||||
data_size = get_long_be(fp.read(4))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue