Skip to content

Commit 68744be

Browse files
author
Release Manager
committed
gh-39454: remove deprecated stuff in permutation.py found using the scripts in #39262 ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. URL: #39454 Reported by: Frédéric Chapoton Reviewer(s): Travis Scrimshaw
2 parents 784ff00 + 1518898 commit 68744be

File tree

1 file changed

+2
-52
lines changed

1 file changed

+2
-52
lines changed

src/sage/combinat/permutation.py

+2-52
Original file line numberDiff line numberDiff line change
@@ -7758,7 +7758,7 @@ def reflection(self, i):
77587758
return self.element_class(self, data, check=False)
77597759

77607760
class Element(Permutation):
7761-
def has_left_descent(self, i, mult=None):
7761+
def has_left_descent(self, i):
77627762
r"""
77637763
Check if ``i`` is a left descent of ``self``.
77647764
@@ -7789,23 +7789,7 @@ def has_left_descent(self, i, mult=None):
77897789
[1, 2]
77907790
sage: [i for i in P.index_set() if x.has_left_descent(i)]
77917791
[1, 2]
7792-
7793-
TESTS::
7794-
7795-
sage: P = Permutations(4)
7796-
sage: x = P([3, 2, 4, 1])
7797-
sage: x.has_left_descent(2, mult='l2r')
7798-
doctest:warning
7799-
...
7800-
DeprecationWarning: The mult option is deprecated and ignored.
7801-
See https://github.com/sagemath/sage/issues/27467 for details.
7802-
True
7803-
sage: x.has_left_descent(2, mult='r2l')
7804-
True
78057792
"""
7806-
if mult is not None:
7807-
from sage.misc.superseded import deprecation
7808-
deprecation(27467, "The mult option is deprecated and ignored.")
78097793
for val in self._list:
78107794
if val == i:
78117795
return False
@@ -7843,24 +7827,8 @@ def has_right_descent(self, i, mult=None):
78437827
[1, 3]
78447828
sage: [i for i in P.index_set() if x.has_right_descent(i)]
78457829
[1, 3]
7846-
7847-
TESTS::
7848-
7849-
sage: P = Permutations(4)
7850-
sage: x = P([3, 2, 4, 1])
7851-
sage: x.has_right_descent(3, mult='l2r')
7852-
doctest:warning
7853-
...
7854-
DeprecationWarning: The mult option is deprecated and ignored.
7855-
See https://github.com/sagemath/sage/issues/27467 for details.
7856-
True
7857-
sage: x.has_right_descent(3, mult='r2l')
7858-
True
78597830
"""
7860-
if mult is not None:
7861-
from sage.misc.superseded import deprecation
7862-
deprecation(27467, "The mult option is deprecated and ignored.")
7863-
return self[i-1] > self[i]
7831+
return self[i - 1] > self[i]
78647832

78657833
def __mul__(self, other):
78667834
r"""
@@ -9602,24 +9570,6 @@ def __init__(self, n, a):
96029570
StandardPermutations_n_abstract.__init__(self, n)
96039571
self._a = a
96049572

9605-
@property
9606-
def a(self):
9607-
r"""
9608-
``self.a`` is deprecated; use :meth:`patterns` instead.
9609-
9610-
TESTS::
9611-
9612-
sage: P = Permutations(3, avoiding=[[2,1,3],[1,2,3]])
9613-
sage: P.a
9614-
doctest:...: DeprecationWarning: The attribute a for the list of patterns to avoid is deprecated, use the method patterns instead.
9615-
See https://github.com/sagemath/sage/issues/26810 for details.
9616-
([2, 1, 3], [1, 2, 3])
9617-
"""
9618-
from sage.misc.superseded import deprecation
9619-
deprecation(26810, "The attribute a for the list of patterns to avoid is "
9620-
"deprecated, use the method patterns instead.")
9621-
return self.patterns()
9622-
96239573
def patterns(self):
96249574
"""
96259575
Return the patterns avoided by this class of permutations.

0 commit comments

Comments
 (0)