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

Commit

Permalink
is_Polyhedron: Deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Aug 25, 2021
1 parent 4f0345b commit f7f15a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sage/geometry/polyhedron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from sage.misc.cachefunc import cached_method
from sage.misc.all import prod
from sage.misc.randstate import current_randstate
from sage.misc.superseded import deprecated_function_alias
from sage.misc.superseded import deprecation, deprecated_function_alias

from sage.rings.all import QQ, ZZ, AA
from sage.rings.real_double import RDF
Expand Down Expand Up @@ -77,6 +77,9 @@ def is_Polyhedron(X):
"""
Test whether ``X`` is a Polyhedron.
This method is deprecated; use ``isinstance`` with class
:class:`~sage.structure.element.Polyhedron` instead.
INPUT:
- ``X`` -- anything.
Expand All @@ -94,7 +97,8 @@ def is_Polyhedron(X):
sage: is_Polyhedron(123456)
False
"""
return isinstance(X, Polyhedron_base)
deprecation(32414, "using is_Polyhedron is deprecated; use isinstance with class sage.structure.element.Polyhedron instead")
return isinstance(X, Polyhedron)


#########################################################################
Expand Down

0 comments on commit f7f15a7

Please sign in to comment.