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
In SAGE 2.6, you can do list * integer but not integer * list. Either they should both work (more like python) or neither of them should work (for internal consistency).
sage: [3, 4, 5] * 2
[3, 4, 5, 3, 4, 5]
sage: 2 * [3, 4, 5]
---------------------------------------------------------------------------
<type 'exceptions.TypeError'> Traceback (most recent call last)
/home/dmharvey/sage-2.6/<ipython console> in <module>()
/home/dmharvey/sage-2.6/element.pyx in element.RingElement.__mul__()
/home/dmharvey/sage-2.6/element.pyx in element.bin_op_c()
<type 'exceptions.TypeError'>: unsupported operand parent(s) for '*': 'Integer Ring' and '<type 'list'>'
In SAGE 2.6, you can do list * integer but not integer * list. Either they should both work (more like python) or neither of them should work (for internal consistency).
Component: basic arithmetic
Issue created by migration from https://trac.sagemath.org/ticket/401
The text was updated successfully, but these errors were encountered: