Skip to content

Commit 0e9d4fc

Browse files
committed
doctests fixes
1 parent d0ceeed commit 0e9d4fc

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

src/sage/combinat/colored_permutations.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ class ColoredPermutations(Parent, UniqueRepresentation):
435435
sage: s2*t*s2
436436
[[0, 1, 0], [1, 2, 3]]
437437
438-
We can also create a colored permutation by passing either
438+
We can also create a colored permutation by passing
439439
an iterable consisting of tuples consisting of ``(color, element)``::
440440
441441
sage: x = C([(2,1), (3,3), (3,2)]); x
@@ -455,12 +455,10 @@ class ColoredPermutations(Parent, UniqueRepresentation):
455455
[[0, 0, 0], [3, 1, 2]]
456456
457457
458-
TESTS::
458+
A colored permutation::
459459
460-
sage: T = ColoredPermutations(3,4); type(T[0])
461-
<class 'sage.combinat.colored_permutations.ColoredPermutations_with_category.element_class'>
462-
sage: C(T[0])
463-
[[0, 0, 0], [1, 2, 3]]
460+
sage: C(C.an_element()) == C.an_element()
461+
True
464462
465463
REFERENCES:
466464
@@ -1006,13 +1004,6 @@ def __classcall_private__(cls, pi):
10061004
10071005
sage: SignedPermutation(range(1,4))
10081006
[1, 2, 3]
1009-
1010-
TESTS::
1011-
1012-
sage: T = SignedPermutation(range(1,4)); type(T)
1013-
<class 'sage.combinat.colored_permutations.SignedPermutations_with_category.element_class'>
1014-
sage: SignedPermutation(T)
1015-
[1, 2, 3]
10161007
"""
10171008
return SignedPermutations(len(list(pi)))(pi)
10181009

@@ -1384,6 +1375,9 @@ def _element_constructor_(self, x):
13841375
sage: S([]) == list(S)[0]
13851376
True
13861377
1378+
sage: T = SignedPermutation(range(1,4))
1379+
sage: SignedPermutations(3)(T)
1380+
[1, 2, 3]
13871381
"""
13881382
if isinstance(x, self.element_class) and x.parent() is self:
13891383
return self

0 commit comments

Comments
 (0)