Fix Binary.__eq__ (closes #4172701) stable
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 22 Jul 2014 17:22:23 +0200
branchstable
changeset 9912 a84922befb89
parent 9893 cba05de9a1a0
child 9920 5aa730bf445e
Fix Binary.__eq__ (closes #4172701) Due to a typo we always returned true, which was unhelpful.
__init__.py
--- a/__init__.py	Fri Jul 18 16:11:41 2014 +0200
+++ b/__init__.py	Tue Jul 22 17:22:23 2014 +0200
@@ -125,7 +125,7 @@
     def __eq__(self, other):
         if not isinstance(other, Binary):
             return False
-        return self.getvalue(), other.getvalue()
+        return self.getvalue() == other.getvalue()
 
 
     # Binary helpers to store/fetch python objects