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

@ -185,7 +185,7 @@ class SGMLParser:
# Internal -- parse comment, return length or -1 if not terminated
def parse_comment(self, i):
rawdata = self.rawdata
if rawdata[i:i+4] <> '<!--':
if rawdata[i:i+4] != '<!--':
raise RuntimeError, 'unexpected call to handle_comment'
match = commentclose.search(rawdata, i+4)
if not match:
@ -198,7 +198,7 @@ class SGMLParser:
# Internal -- parse processing instr, return length or -1 if not terminated
def parse_pi(self, i):
rawdata = self.rawdata
if rawdata[i:i+2] <> '<?':
if rawdata[i:i+2] != '<?':
raise RuntimeError, 'unexpected call to handle_pi'
match = piclose.search(rawdata, i+2)
if not match: