Python 3 portability.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2020-11-20 17:03:11 +00:00
parent cb6ef790f9
commit d74fbbcd01
1 changed files with 6 additions and 2 deletions

View File

@ -5,9 +5,13 @@ import sys
from multiprocessing import Pool, cpu_count
from traceback import print_exc
from itertools import combinations
from string import maketrans
if sys.version_info[0] == 2: range = xrange
if sys.version_info[0] == 2:
range = xrange
from string import maketrans
else:
maketrans = str.maketrans
# Let Ep/Fp : y^2 = x^3 + bp
# Let Eq/Fq : y^2 = x^3 + bq