diff options
Diffstat (limited to 'Lib/optparse.py')
-rw-r--r-- | Lib/optparse.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/optparse.py b/Lib/optparse.py index 0972f74..f8f643d 100644 --- a/Lib/optparse.py +++ b/Lib/optparse.py @@ -838,13 +838,13 @@ class Values: __repr__ = _repr - def __cmp__(self, other): + def __eq__(self, other): if isinstance(other, Values): - return cmp(self.__dict__, other.__dict__) + return self.__dict__ == other.__dict__ elif isinstance(other, types.DictType): - return cmp(self.__dict__, other) + return self.__dict__ == other else: - return -1 + return NotImplemented def _update_careful(self, dict): """ |