15
15
16
16
>>> p = 2; n = 5
17
17
>>> cpdb[p][n]
18
- [ 1, 0, 1, 0, 0, 1]
18
+ ( 1, 0, 1, 0, 0, 1)
19
19
20
20
>>> p = 2; n = 17
21
21
>>> cpdb[p][17]
22
- [ 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
22
+ ( 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
23
23
24
24
"""
25
25
@@ -28,7 +28,7 @@ def _parse_line(l):
28
28
r"""
29
29
Parse a single line (not the first or the last) from Frank
30
30
Lübeck's data file into a triplet (p, n, coeffs), where ``p`` and
31
- ``n`` are python integers and ``coeffs`` is a list of
31
+ ``n`` are python integers and ``coeffs`` is a tuple of
32
32
them. According to Frank's webpage, each line has the form,
33
33
34
34
[p, n, [a0, a1, ..., 1]],
@@ -46,7 +46,7 @@ def _parse_line(l):
46
46
# Convert everything to integers before returning.
47
47
p = int (fields [0 ])
48
48
n = int (fields [1 ])
49
- coeffs = [ int (c ) for c in fields [2 :]]
49
+ coeffs = tuple ( int (c ) for c in fields [2 :] )
50
50
51
51
return (p , n , coeffs )
52
52
@@ -59,7 +59,7 @@ def database():
59
59
60
60
The returned dictionary is of the form ``{p => {n => coeffs}}``,
61
61
where ``p`` is a prime, ``n`` is a degree, and ``coeffs`` is a
62
- list of coefficients. The coefficients are listed in "ascending"
62
+ tuple of coefficients. The coefficients are listed in "ascending"
63
63
order, i.e. they are indexed by the degree of the monomial they
64
64
sit in front of.
65
65
0 commit comments