Avoid mixed-type comparision in _py_htmltext.

This commit is contained in:
Neil Schemenauer 2016-10-04 13:11:02 -07:00
parent 9352cfe80e
commit b59e32042e
1 changed files with 4 additions and 0 deletions

View File

@ -44,9 +44,13 @@ class htmltext(object):
return len(self.s)
def __eq__(self, other):
if isinstance(other, htmltext):
return (self.s == other.s)
return (self.s == other)
def __lt__(self, other):
if isinstance(other, htmltext):
return (self.s < other.s)
return (self.s < other)
def __hash__(self):