|
37 | 37 |
|
38 | 38 | try: |
39 | 39 | from gmpy2 import mpz |
40 | | - GMPY=True |
| 40 | + GMPY = True |
41 | 41 | except ImportError: |
42 | 42 | try: |
43 | 43 | from gmpy import mpz |
44 | | - GMPY=True |
| 44 | + GMPY = True |
45 | 45 | except ImportError: |
46 | | - GMPY=False |
| 46 | + GMPY = False |
47 | 47 |
|
48 | 48 |
|
49 | 49 | from six import python_2_unicode_compatible |
@@ -84,13 +84,13 @@ def __init__(self, p, a, b, h=None): |
84 | 84 | self.__a = a |
85 | 85 | self.__b = b |
86 | 86 | self.__h = h |
87 | | - |
| 87 | + |
88 | 88 | def __eq__(self, other): |
89 | | - if isinstance(other, CurveFp): |
| 89 | + if isinstance(other, CurveFp): |
90 | 90 | """Return True if the curves are identical, False otherwise.""" |
91 | 91 | return self.__p == other.__p \ |
92 | | - and self.__a == other.__a \ |
93 | | - and self.__b == other.__b |
| 92 | + and self.__a == other.__a \ |
| 93 | + and self.__b == other.__b |
94 | 94 | return NotImplemented |
95 | 95 |
|
96 | 96 | def __hash__(self): |
@@ -155,7 +155,7 @@ def __init__(self, curve, x, y, z, order=None, generator=False): |
155 | 155 | self.__y = y |
156 | 156 | self.__z = z |
157 | 157 | self.__order = order |
158 | | - self.__precompute=[] |
| 158 | + self.__precompute = [] |
159 | 159 | if generator: |
160 | 160 | assert order |
161 | 161 | i = 1 |
@@ -192,7 +192,7 @@ def __eq__(self, other): |
192 | 192 | # compare the fractions by bringing them to the same denominator |
193 | 193 | # depend on short-circuit to save 4 multiplications in case of inequality |
194 | 194 | return (x1 * zz2 - x2 * zz1) % p == 0 and \ |
195 | | - (y1 * zz2 * z2 - y2 * zz1 * z1) % p == 0 |
| 195 | + (y1 * zz2 * z2 - y2 * zz1 * z1) % p == 0 |
196 | 196 |
|
197 | 197 | def order(self): |
198 | 198 | """Return the order of the point. |
@@ -604,10 +604,10 @@ def __init__(self, curve, x, y, order=None): |
604 | 604 |
|
605 | 605 | def __eq__(self, other): |
606 | 606 | """Return True if the points are identical, False otherwise.""" |
607 | | - if isinstance(other, Point): |
| 607 | + if isinstance(other, Point): |
608 | 608 | return self.__curve == other.__curve \ |
609 | | - and self.__x == other.__x \ |
610 | | - and self.__y == other.__y |
| 609 | + and self.__x == other.__x \ |
| 610 | + and self.__y == other.__y |
611 | 611 | return NotImplemented |
612 | 612 |
|
613 | 613 | def __neg__(self): |
|
0 commit comments