From f35342993c678fcc60c333e9ea42c25a61f61646 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Mon, 14 Nov 2011 19:13:16 +0000 Subject: [PATCH] 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 --- hints.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hints.py b/hints.py index dfc4539..07a9ffa 100644 --- a/hints.py +++ b/hints.py @@ -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