Skip to content

Commit 9fe3e99

Browse files
author
Matthias Koeppe
committed
src/sage/monoids/free_abelian_monoid.py: Deprecate is_FreeAbelianMonoid
1 parent 1a87b7c commit 9fe3e99

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sage/monoids/free_abelian_monoid.py

+6
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ def is_FreeAbelianMonoid(x):
169169
170170
sage: from sage.monoids.free_abelian_monoid import is_FreeAbelianMonoid
171171
sage: is_FreeAbelianMonoid(5)
172+
doctest:warning...
173+
DeprecationWarning: the function is_FreeAbelianMonoid is deprecated;
174+
use 'isinstance(..., FreeAbelianMonoid_class)' instead
175+
See https://github.com/sagemath/sage/issues/37897 for details.
172176
False
173177
sage: is_FreeAbelianMonoid(FreeAbelianMonoid(7,'a'))
174178
True
@@ -177,6 +181,8 @@ def is_FreeAbelianMonoid(x):
177181
sage: is_FreeAbelianMonoid(FreeMonoid(0,''))
178182
False
179183
"""
184+
from sage.misc.superseded import deprecation
185+
deprecation(37897, "the function is_FreeAbelianMonoid is deprecated; use 'isinstance(..., FreeAbelianMonoid_class)' instead")
180186
return isinstance(x, FreeAbelianMonoid_class)
181187

182188

0 commit comments

Comments
 (0)