Skip to content

Commit

Permalink
remove deprecated stuff in permutation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Feb 5, 2025
1 parent dc99dc8 commit 1518898
Showing 1 changed file with 2 additions and 52 deletions.
54 changes: 2 additions & 52 deletions src/sage/combinat/permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7758,7 +7758,7 @@ def reflection(self, i):
return self.element_class(self, data, check=False)

class Element(Permutation):
def has_left_descent(self, i, mult=None):
def has_left_descent(self, i):
r"""
Check if ``i`` is a left descent of ``self``.
Expand Down Expand Up @@ -7789,23 +7789,7 @@ def has_left_descent(self, i, mult=None):
[1, 2]
sage: [i for i in P.index_set() if x.has_left_descent(i)]
[1, 2]
TESTS::
sage: P = Permutations(4)
sage: x = P([3, 2, 4, 1])
sage: x.has_left_descent(2, mult='l2r')
doctest:warning
...
DeprecationWarning: The mult option is deprecated and ignored.
See https://github.com/sagemath/sage/issues/27467 for details.
True
sage: x.has_left_descent(2, mult='r2l')
True
"""
if mult is not None:
from sage.misc.superseded import deprecation
deprecation(27467, "The mult option is deprecated and ignored.")
for val in self._list:
if val == i:
return False
Expand Down Expand Up @@ -7843,24 +7827,8 @@ def has_right_descent(self, i, mult=None):
[1, 3]
sage: [i for i in P.index_set() if x.has_right_descent(i)]
[1, 3]
TESTS::
sage: P = Permutations(4)
sage: x = P([3, 2, 4, 1])
sage: x.has_right_descent(3, mult='l2r')
doctest:warning
...
DeprecationWarning: The mult option is deprecated and ignored.
See https://github.com/sagemath/sage/issues/27467 for details.
True
sage: x.has_right_descent(3, mult='r2l')
True
"""
if mult is not None:
from sage.misc.superseded import deprecation
deprecation(27467, "The mult option is deprecated and ignored.")
return self[i-1] > self[i]
return self[i - 1] > self[i]

def __mul__(self, other):
r"""
Expand Down Expand Up @@ -9602,24 +9570,6 @@ def __init__(self, n, a):
StandardPermutations_n_abstract.__init__(self, n)
self._a = a

@property
def a(self):
r"""
``self.a`` is deprecated; use :meth:`patterns` instead.
TESTS::
sage: P = Permutations(3, avoiding=[[2,1,3],[1,2,3]])
sage: P.a
doctest:...: DeprecationWarning: The attribute a for the list of patterns to avoid is deprecated, use the method patterns instead.
See https://github.com/sagemath/sage/issues/26810 for details.
([2, 1, 3], [1, 2, 3])
"""
from sage.misc.superseded import deprecation
deprecation(26810, "The attribute a for the list of patterns to avoid is "
"deprecated, use the method patterns instead.")
return self.patterns()

def patterns(self):
"""
Return the patterns avoided by this class of permutations.
Expand Down

0 comments on commit 1518898

Please sign in to comment.