viff

changeset 952:4dd2fedb0a8b

Faster way of unzipping a list.
author Martin Geisler <mg@daimi.au.dk>
date Sat, 27 Sep 2008 10:42:21 +0200
parents bb06a2538928
children e1b809d032df
files viff/shamir.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/viff/shamir.py	Fri Sep 26 21:52:00 2008 +0200
     1.2 +++ b/viff/shamir.py	Sat Sep 27 10:42:21 2008 +0200
     1.3 @@ -98,8 +98,7 @@
     1.4      Shares is a list of *threshold* + 1 ``(player id, share)`` pairs.
     1.5      Recombination is done in the optional point *x_recomb*.
     1.6      """
     1.7 -    xs = [x_i for (x_i, _) in shares]
     1.8 -    ys = [y_i for (_, y_i) in shares]
     1.9 +    xs, ys = zip(*shares)
    1.10      try:
    1.11          key = tuple(xs) + (x_recomb, )
    1.12          vector = _recombination_vectors[key]