viff

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 diff
     1.1 --- a/viff/runtime.py	Fri Apr 04 21:16:26 2008 +0200
     1.2 +++ b/viff/runtime.py	Fri Apr 04 21:20:19 2008 +0200
     1.3 @@ -722,18 +722,16 @@
     1.4  
     1.5          field = getattr(share_a, "field", getattr(share_b, "field", None))
     1.6  
     1.7 -        if not isinstance(share_a, Share) and not isinstance(share_a,
     1.8 -                                                             FieldElement):
     1.9 +        if not isinstance(share_a, (Share, FieldElement)):
    1.10              share_a = Share(self, field, share_a)
    1.11  
    1.12 -        if not isinstance(share_b, Share) and not isinstance(share_b,
    1.13 -                                                             FieldElement):
    1.14 +        if not isinstance(share_b, (Share, FieldElement)):
    1.15              share_b = Share(self, field, share_b)
    1.16  
    1.17          if isinstance(share_a, FieldElement) and isinstance(share_b,
    1.18                                                              FieldElement):
    1.19              return Share(self, field, share_a * share_b)
    1.20 -        
    1.21 +
    1.22          if isinstance(share_a, FieldElement):
    1.23              share_b.addCallback(lambda x: Share(self, field, share_a*x.value))
    1.24              return share_b