From 29e8b8081d46f8c94467103ddeaf772ebef243d7 Mon Sep 17 00:00:00 2001 From: Martin Lackner Date: Wed, 16 Feb 2022 14:53:54 +0100 Subject: [PATCH] fix alldifferent example --- apportionment/examples/alldifferent.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apportionment/examples/alldifferent.py b/apportionment/examples/alldifferent.py index ef91209..04021db 100644 --- a/apportionment/examples/alldifferent.py +++ b/apportionment/examples/alldifferent.py @@ -19,14 +19,11 @@ for iterations, votes in enumerate(iterator): apportionments = set() for method in methods: - try: # in case of ties an exception occurs because tiesallowed=False - apportionments.add( + apportionments.add( tuple( - app.compute(method, votes, seats, tiesallowed=False, verbose=False) + app.compute(method, votes, seats, verbose=False) ) ) - except Exception: - pass if len(apportionments) == len(methods): break