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

Commit

Permalink
is_IntegerModRing: Deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Oct 1, 2021
1 parent f596395 commit af06e5b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sage/rings/finite_rings/integer_mod_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,18 @@ def is_IntegerModRing(x):
"""
Return ``True`` if ``x`` is an integer modulo ring.
This function is deprecated. Use :func:`isinstance` with
:class:`sage.rings.abc.IntegerModRing` instead.
EXAMPLES::
sage: from sage.rings.finite_rings.integer_mod_ring import is_IntegerModRing
sage: R = IntegerModRing(17)
sage: is_IntegerModRing(R)
doctest:warning...
DeprecationWarning: the function is_IntegerModRing is deprecated.
Use isinstance(..., sage.rings.abc.IntegerModRing) instead.
See https://trac.sagemath.org/32606 for details.
True
sage: is_IntegerModRing(GF(13))
True
Expand All @@ -259,6 +266,9 @@ def is_IntegerModRing(x):
sage: is_IntegerModRing(ZZ)
False
"""
from sage.misc.superseded import deprecation
deprecation(32606, "the function is_IntegerModRing is deprecated. "
"Use isinstance(..., sage.rings.abc.IntegerModRing) instead.")
return isinstance(x, IntegerModRing_generic)


Expand Down

0 comments on commit af06e5b

Please sign in to comment.