Skip to content

Commit f7ae0c6

Browse files
mantepsetscrim
andauthored
Apply suggestions from code review
return tuples since the function value is cached. Co-authored-by: Travis Scrimshaw <[email protected]>
1 parent 15ed781 commit f7ae0c6

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/sage/rings/species.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2516,9 +2516,8 @@ def _atomic_set_like_species(n, names):
25162516
25172517
INPUT:
25182518
2519-
- ``n`` -- positive integer, the degree
2520-
- ``names`` -- an iterable of strings for the sorts of the
2521-
species
2519+
- ``n`` -- positive integer, the degree
2520+
- ``names`` -- an iterable of strings for the sorts of the species
25222521
25232522
EXAMPLES::
25242523
@@ -2533,14 +2532,14 @@ def _atomic_set_like_species(n, names):
25332532
0: A007650: Number of set-like atomic species of degree n.
25342533
25352534
sage: _atomic_set_like_species(4, "U, V")
2536-
[E_2(E_2(V)), E_2(E_2(U)), E_2(V^2), E_2(U*V), E_2(U^2), E_4(U), E_4(V)]
2535+
(E_2(E_2(V)), E_2(E_2(U)), E_2(V^2), E_2(U*V), E_2(U^2), E_4(U), E_4(V))
25372536
"""
25382537
if not n:
2539-
return []
2538+
return ()
25402539
M1 = MolecularSpecies("X")
25412540
M = MolecularSpecies(names)
25422541
if n == 1:
2543-
return [M(SymmetricGroup(1), {s: [1]}) for s in range(M._arity)]
2542+
return tuple([M(SymmetricGroup(1), {s: [1]}) for s in range(M._arity)])
25442543
result = []
25452544
for d in divisors(n):
25462545
if d == 1:
@@ -2561,4 +2560,4 @@ def _atomic_set_like_species(n, names):
25612560
F = E_d(G)
25622561
F.support()[0].rename(f"E_{d}({G})")
25632562
result.append(F)
2564-
return result
2563+
return tuple(result)

0 commit comments

Comments
 (0)