diff --git a/IPython/Extensions/ipipe.py b/IPython/Extensions/ipipe.py index 164daca..6dc92bf 100644 --- a/IPython/Extensions/ipipe.py +++ b/IPython/Extensions/ipipe.py @@ -1290,6 +1290,12 @@ class ipwdentry(object): self._id = id self._entry = None + def __eq__(self, other): + return self.__class__ is other.__class__ and self._id == other._id + + def __ne__(self, other): + return self.__class__ is not other.__class__ or self._id != other._id + def _getentry(self): if self._entry is None: if isinstance(self._id, basestring): @@ -1371,6 +1377,12 @@ class igrpentry(object): self._id = id self._entry = None + def __eq__(self, other): + return self.__class__ is other.__class__ and self._id == other._id + + def __ne__(self, other): + return self.__class__ is not other.__class__ or self._id != other._id + def _getentry(self): if self._entry is None: if isinstance(self._id, basestring): diff --git a/doc/ChangeLog b/doc/ChangeLog index 1df7023..fd47a7b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -4,6 +4,7 @@ "refreshfind" (mapped to "R") does the same but tries to go back to the same object the cursor was on before the refresh. The command "markrange" is mapped to "%" now. + * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable. 2006-11-29 Fernando Perez