Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 57077e5

Browse files
committed
16613: Deprecate content
1 parent 78d45b9 commit 57077e5

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

src/sage/rings/polynomial/polynomial_element.pyx

+2-29
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ from sage.misc.cachefunc import cached_function
105105
from sage.categories.map cimport Map
106106
from sage.categories.morphism cimport Morphism
107107

108-
from sage.misc.superseded import deprecation
108+
from sage.misc.superseded import deprecation, deprecated_function_alias
109109

110110
cpdef is_Polynomial(f):
111111
"""
@@ -7307,34 +7307,7 @@ cdef class Polynomial(CommutativeAlgebraElement):
73077307
"""
73087308
return self.base_ring().ideal(self.coefficients())
73097309

7310-
def content(self):
7311-
"""
7312-
Return the content of this polynomial, defined as the gcd of its
7313-
coefficients.
7314-
7315-
.. WARNING::
7316-
7317-
Over some rings, this method used to return the ideal generated by
7318-
the coefficients. The method :meth:`content_ideal` now serves this
7319-
purpose.
7320-
7321-
.. SEEALSO::
7322-
7323-
:meth:`content_ideal`
7324-
7325-
EXAMPLES::
7326-
7327-
sage: R.<x> = PolynomialRing(ZZ, sparse=True)
7328-
sage: p = 2*x^2 + 6*x - 4
7329-
sage: p.content()
7330-
2
7331-
sage: S.<y> = R[]
7332-
sage: q = 3*(x^2 - 1) * y + 2*(x+1)
7333-
sage: q.content()
7334-
x + 1
7335-
"""
7336-
from sage.arith.all import gcd
7337-
return gcd(self.coefficients())
7310+
content = deprecated_function_alias(16613, content_ideal)
73387311

73397312
def norm(self, p):
73407313
r"""

0 commit comments

Comments
 (0)