viff

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 diff
     1.1 --- a/viff/runtime.py	Sun Aug 24 23:26:45 2008 +0200
     1.2 +++ b/viff/runtime.py	Tue Sep 16 16:08:08 2008 +0200
     1.3 @@ -132,6 +132,15 @@
     1.4          # self >= other
     1.5          return self.runtime.greater_than_equal(self, other)
     1.6  
     1.7 +    def __eq__(self, other):
     1.8 +        """Equality testing."""
     1.9 +        return self.runtime.equal(self, other)
    1.10 +
    1.11 +    def __neq__(self, other):
    1.12 +        """Negated equality testing."""
    1.13 +        return 1 - self.runtime.equal(self, other)
    1.14 +
    1.15 +
    1.16      def clone(self):
    1.17          """Clone a share.
    1.18