Status: New Owner: ---- Labels: Type-Defect Priority-Medium New issue 1474 by tom.denniston: Subs broken on sub classes of Symbol using sympy 0.6.4 on linux http://code.google.com/p/sympy/issues/detail?id=1474
When I subclass sympy.Symbol as below I cannot .subs() for that symbol in an expression. For instance if I define this subclass: In [8]: class Mysymbol(sympy.Symbol): pass ...: In [10]: Then I try to subs 'X' for 'B' where B is a sympy.Symbol no problem: In [11]: (sympy.Symbol('A')*sympy.Symbol('B')).subs('B','X') Out[11]: A*X Then I try to subs 'X' for 'B' where B is a Mysymbol, problem: In [12]: (sympy.Symbol('A')*Mysymbol('B')).subs('B','X') Out[12]: A*B Incidentally a mysymbol within the expression if it is not what I am trying to replace is harmless but, oddly, changes the order of the result. In [13]: (Mysymbol('A')*sympy.Symbol('B')).subs('B','X') Out[13]: X*A Is there something I should be doing when sub classing or is this simply a bug? I googled around this site for issues related. I found something on sqrts that appears to be fixed in 0.6.4 from what I can tell. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to sympy-issues@googlegroups.com To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---