Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
user202729 committed Feb 4, 2025
1 parent bc5c6c1 commit 73ee001
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sage/rings/polynomial/polynomial_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,13 +1073,15 @@ def __iter__(self):
from sage.rings.semirings.non_negative_integer_semiring import NN
from sage.sets.set import Set
R_nonzero = Set(R) - Set([zero])

def polynomials_with_degree(d):
"""
Return the family of polynomials with degree exactly ``d``.
"""
nonlocal self, R, R_nonzero
return Family(cartesian_product([R] * d + [R_nonzero]),
lambda t: self([*t]), lazy=True)

yield from DisjointUnionEnumeratedSets(Family(NN, polynomials_with_degree))
assert False, "this should not be reached"

Expand Down

0 comments on commit 73ee001

Please sign in to comment.