changeset 917:efa3a7721e4a

Overload == for Shares.
author Sigurd Meldgaard <stm@daimi.au.dk>
date Tue, 16 Sep 2008 16:08:08 +0200
parents 635a8d6ac335
children 83c89640a6ee
files viff/runtime.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/viff/runtime.py	Sun Aug 24 23:26:45 2008 +0200
+++ b/viff/runtime.py	Tue Sep 16 16:08:08 2008 +0200
@@ -132,6 +132,15 @@
         # self >= other
         return self.runtime.greater_than_equal(self, other)
 
+    def __eq__(self, other):
+        """Equality testing."""
+        return self.runtime.equal(self, other)
+
+    def __neq__(self, other):
+        """Negated equality testing."""
+        return 1 - self.runtime.equal(self, other)
+
+
     def clone(self):
         """Clone a share.