diff --git a/src/sage/combinat/integer_vector.py b/src/sage/combinat/integer_vector.py index 7295ba97571..e0cd57a3eec 100644 --- a/src/sage/combinat/integer_vector.py +++ b/src/sage/combinat/integer_vector.py @@ -30,6 +30,7 @@ from sage.combinat.integer_lists import IntegerListsLex from itertools import product +from collections.abc import Sequence import numbers from sage.structure.parent import Parent @@ -696,7 +697,7 @@ def __contains__(self, x): if isinstance(x, IntegerVector): return True - if not isinstance(x, (list, tuple)): + if not isinstance(x, Sequence): return False for i in x: