viff

changeset 1101:b79734a2fdbf

Allow long integer exponents in pow.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 17 Feb 2009 09:30:32 +0100
parents e810a006c2bf
children 3442612fee88
files viff/passive.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/viff/passive.py	Mon Feb 09 10:50:57 2009 +0100
     1.2 +++ b/viff/passive.py	Tue Feb 17 09:30:32 2009 +0100
     1.3 @@ -213,7 +213,7 @@
     1.4      def pow(self, share, exponent):
     1.5          """Exponentation of a share to an integer by square-and-multiply."""
     1.6  
     1.7 -        assert isinstance(exponent, int), "Exponent must be an integer"
     1.8 +        assert isinstance(exponent, (int, long)), "Exponent must be an integer"
     1.9          assert exponent >= 0, "Exponent must be non-negative"
    1.10  
    1.11          if exponent == 0: