Skip to content

Commit 3ce4a62

Browse files
committed
generalized fix
1 parent ef68b89 commit 3ce4a62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sage/combinat/colored_permutations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"""
99
import itertools
1010

11+
from collections.abc import Iterable
1112
from sage.structure.element import MultiplicativeGroupElement
1213
from sage.structure.parent import Parent
1314
from sage.structure.unique_representation import UniqueRepresentation
@@ -1361,7 +1362,7 @@ def _element_constructor_(self, x):
13611362
True
13621363
13631364
"""
1364-
if isinstance(x, list) or isinstance(x, range):
1365+
if isinstance(x, Iterable):
13651366
if x and isinstance(x[0], tuple):
13661367
c = []
13671368
p = []

0 commit comments

Comments
 (0)