changeset 636:ba9166a59c20

Shorter lines.
author Martin Geisler <mg@daimi.au.dk>
date Fri, 04 Apr 2008 21:20:19 +0200
parents a7f03661f81d
children d1d4c633fca8
files viff/runtime.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/viff/runtime.py	Fri Apr 04 21:16:26 2008 +0200
+++ b/viff/runtime.py	Fri Apr 04 21:20:19 2008 +0200
@@ -722,18 +722,16 @@
 
         field = getattr(share_a, "field", getattr(share_b, "field", None))
 
-        if not isinstance(share_a, Share) and not isinstance(share_a,
-                                                             FieldElement):
+        if not isinstance(share_a, (Share, FieldElement)):
             share_a = Share(self, field, share_a)
 
-        if not isinstance(share_b, Share) and not isinstance(share_b,
-                                                             FieldElement):
+        if not isinstance(share_b, (Share, FieldElement)):
             share_b = Share(self, field, share_b)
 
         if isinstance(share_a, FieldElement) and isinstance(share_b,
                                                             FieldElement):
             return Share(self, field, share_a * share_b)
-        
+
         if isinstance(share_a, FieldElement):
             share_b.addCallback(lambda x: Share(self, field, share_a*x.value))
             return share_b