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:
Fred Drake 2000-12-12 23:20:45 +00:00
parent c140131995
commit 8152d32375
36 changed files with 101 additions and 99 deletions

View file

@ -189,7 +189,7 @@ class BinHex:
hqxer = _Hqxcoderengine(ofp)
self.ofp = _Rlecoderengine(hqxer)
self.crc = 0
if finfo == None:
if finfo is None:
finfo = FInfo()
self.dlen = dlen
self.rlen = rlen
@ -228,7 +228,7 @@ class BinHex:
self._write(data)
def close_data(self):
if self.dlen <> 0:
if self.dlen != 0:
raise Error, 'Incorrect data size, diff='+`self.rlen`
self._writecrc()
self.state = _DID_DATA
@ -246,7 +246,7 @@ class BinHex:
self.close_data()
if self.state != _DID_DATA:
raise Error, 'Close at the wrong time'
if self.rlen <> 0:
if self.rlen != 0:
raise Error, \
"Incorrect resource-datasize, diff="+`self.rlen`
self._writecrc()