Hint: implement equality based on comparing string representations

This will work for "single package" hints, but should be extended to
consider "easy foo/1 bar/1" and "easy bar/1 foo/1" to be equivalent.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
Adam D. Barratt 2011-11-14 19:13:16 +00:00
parent eb0498be93
commit a2ba758279

View File

@ -65,6 +65,9 @@ class Hint:
def __str__(self):
return self._hint
def __eq__(self, other):
return str(self) == str(other)
@property
def type(self):
return self._type