Unchecked variable in TensorIndexType.__new__ might be error prone

20 views
Skip to first unread message

r.du...@gmail.com

unread,
Jun 20, 2017, 2:58:05 PM6/20/17
to sy...@googlegroups.com
Dear developers of module tensor

The variable name in TensorIndexType.__new__ is only checked against string_types:

https://github.com/sympy/sympy/blob/master/sympy/tensor/tensor.py#L1597

To me this seems error-prone if name is not a symbol.

You might want to proceed as for TensorIndex.__new__
https://github.com/sympy/sympy/blob/master/sympy/tensor/tensor.py#L1828

Best regards
ric

Reply all
Reply to author
Forward
0 new messages