Comment #2 on issue 2125 by asmeurer: Using Integers as python slices.
http://code.google.com/p/sympy/issues/detail?id=2125

Similar is issue 1838.

Regarding S(2)*'1', this definitely should not return S(2). See the discussion at http://groups.google.com/group/sympy/browse_thread/thread/c948c8013d6228af.

Another thing you can do when you find a test for a behavior that you think should be different is use git blame to see what commit introduced it, to see if you can understand why the test is there. In this case, that test was added by:

commit 6e7ccdd231f5e69ed7d06149b3fbc1a71193f5e3
Author: Kirill Smelkov <[email protected]>
Date:   Sat Feb 9 10:59:27 2008 +0300

    [7/7] _sympifyit -- fast decorator to _sympify(arg)

Add, Mul, Pow, etc -- convert the rest of the core at least X.__new__ to use
    _sympify. This is needed so

      x + '1'
      x * '1'
      etc...

    all raises (#677).

which tells us that it comes from issue 677, which leads to an old discussion on the mailing list, which relates to making Integer.__rmul__ work correctly for some custom object, which doesn't seem to me to be a problem with making Integer*Python_object work the same as int*Python_object (though you might have to implement it manually, like in issue 1838, if the Python object doesn't handle rmul on its own).

--
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.

Reply via email to