@@ -435,7 +435,7 @@ class ColoredPermutations(Parent, UniqueRepresentation):
435
435
sage: s2*t*s2
436
436
[[0, 1, 0], [1, 2, 3]]
437
437
438
- We can also create a colored permutation by passing either
438
+ We can also create a colored permutation by passing
439
439
an iterable consisting of tuples consisting of ``(color, element)``::
440
440
441
441
sage: x = C([(2,1), (3,3), (3,2)]); x
@@ -455,12 +455,10 @@ class ColoredPermutations(Parent, UniqueRepresentation):
455
455
[[0, 0, 0], [3, 1, 2]]
456
456
457
457
458
- TESTS ::
458
+ A colored permutation ::
459
459
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
464
462
465
463
REFERENCES:
466
464
@@ -1006,13 +1004,6 @@ def __classcall_private__(cls, pi):
1006
1004
1007
1005
sage: SignedPermutation(range(1,4))
1008
1006
[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]
1016
1007
"""
1017
1008
return SignedPermutations (len (list (pi )))(pi )
1018
1009
@@ -1384,6 +1375,9 @@ def _element_constructor_(self, x):
1384
1375
sage: S([]) == list(S)[0]
1385
1376
True
1386
1377
1378
+ sage: T = SignedPermutation(range(1,4))
1379
+ sage: SignedPermutations(3)(T)
1380
+ [1, 2, 3]
1387
1381
"""
1388
1382
if isinstance (x , self .element_class ) and x .parent () is self :
1389
1383
return self
0 commit comments