You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
isinstance(..., Sequence) does not evaluate to True for sympy.Tuple as it does for the builtin tuple. Is this desired behaviour? It seems counterintuitive to me.
Input:
from collections.abc import Container, Sequence
import sympy
x = [1, 2, 3]
print(x, isinstance(x, Container), isinstance(x, Sequence))
x = (1, 2, 3)
print(x, isinstance(x, Container), isinstance(x, Sequence))
x = sympy.Tuple(1, 2, 3)
print(x, isinstance(x, Container), isinstance(x, Sequence))
isinstance(..., Sequence)
does not evaluate toTrue
forsympy.Tuple
as it does for the builtintuple
. Is this desired behaviour? It seems counterintuitive to me.Input:
Output:
The text was updated successfully, but these errors were encountered: