diff options
author | Fred Drake <fdrake@acm.org> | 2000-12-12 23:20:45 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-12-12 23:20:45 (GMT) |
commit | 8152d32375c40bba9ccbe43b780ebe96d9617781 (patch) | |
tree | f10aba5ba6f1e3064b26d2edfd6fffb45378245d /Lib/xmllib.py | |
parent | c140131995c67b1cd001b5c27e0095c53b1204b4 (diff) | |
download | cpython-8152d32375c40bba9ccbe43b780ebe96d9617781.zip cpython-8152d32375c40bba9ccbe43b780ebe96d9617781.tar.gz cpython-8152d32375c40bba9ccbe43b780ebe96d9617781.tar.bz2 |
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.
Diffstat (limited to 'Lib/xmllib.py')
-rw-r--r-- | Lib/xmllib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xmllib.py b/Lib/xmllib.py index 2f92556..8bca0fc 100644 --- a/Lib/xmllib.py +++ b/Lib/xmllib.py @@ -421,7 +421,7 @@ class XMLParser: # 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 Error('unexpected call to handle_comment') res = commentclose.search(rawdata, i+4) if res is None: @@ -487,7 +487,7 @@ class XMLParser: # Internal -- handle CDATA tag, return length or -1 if not terminated def parse_cdata(self, i): rawdata = self.rawdata - if rawdata[i:i+9] <> '<![CDATA[': + if rawdata[i:i+9] != '<![CDATA[': raise Error('unexpected call to parse_cdata') res = cdataclose.search(rawdata, i+9) if res is None: |