Comment #3 on issue 2125 by nicolas.pourcelot: Using Integers as python
slices.
http://code.google.com/p/sympy/issues/detail?id=2125
"(though you might have to implement it manually, like in issue 1838, if
the Python object doesn't handle rmul on its own)"
Once __index__() method is added, you don't have to :
In [1]: a=Integer(2)
In [2]: [0]*a
Out[2]: [0, 0]
In [3]: a*[0]
Out[3]: [0, 0]
In [4]: a*'text'
Out[4]: texttext
In [5]: 'text'*a
Out[5]: texttext
(Note however that __index__() method is only used if Python version is >=
2.5)
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.