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:11:42 +00:00
parent 63596aeb33
commit 132dce2246
55 changed files with 520 additions and 519 deletions

View file

@ -93,7 +93,7 @@ class Readcd:
if prog < self.status[5] or prog > self.status[6]:
raise Error, 'range error'
end = self.pmsf2msf(prog, min, sec, frame)
elif l <> 3:
elif l != 3:
raise Error, 'syntax error'
if type(start) == type(0):
if start < self.status[5] or start > self.status[6]:
@ -111,7 +111,7 @@ class Readcd:
if prog < self.status[5] or prog > self.status[6]:
raise Error, 'range error'
start = self.pmsf2msf(prog, min, sec, frame)
elif l <> 3:
elif l != 3:
raise Error, 'syntax error'
self.list.append((start, end))
@ -127,10 +127,10 @@ class Readcd:
if self.playing:
start, end = self.list[self.listindex]
if type(end) == type(0):
if cb_type <> CD.PNUM:
if cb_type != CD.PNUM:
self.parser.setcallback(cb_type, func, arg)
else:
if cb_type <> CD.ATIME:
if cb_type != CD.ATIME:
self.parser.setcallback(cb_type, func, arg)
def removecallback(self, cb_type):
@ -140,10 +140,10 @@ class Readcd:
if self.playing:
start, end = self.list[self.listindex]
if type(end) == type(0):
if cb_type <> CD.PNUM:
if cb_type != CD.PNUM:
self.parser.removecallback(cb_type)
else:
if cb_type <> CD.ATIME:
if cb_type != CD.ATIME:
self.parser.removecallback(cb_type)
def gettrackinfo(self, *arg):