On Sun, Mar 18, 2012 at 3:46 AM, Aaron Meurer <[email protected]> wrote: > > It's probably a bad idea to just do a .replace(' ', '') on the input > for a few reasons. First, spaces can be necessary for some syntax > that it parses. For example, when we fix > http://code.google.com/p/sympy/issues/detail?id=3051. > > Second, it's not clear to me what that should do. Should we consider > it to be Symbol('distance traveled')/Symbol('time traveled')? Or > should we consider it as > Symbol('distance')*Symbol('traveled')/Symbol('time')*Symbol('travelled'). > > Finally, the goal of sympify() is to parse expressions in legal Python > syntax, converting each object into SymPy objects. Whitespace has a > different precedence level in Python than what you want to give it > here.
It has just struck me that such problems have very much in common with what is being discussed in this other thread [0] about extending gamma.sympy.org . I don't have solutions to the described problems off-hand, but I am sure that sympify() should benefit off the improvements of gamma.sympy.org as much as possible. I think I may even venture to state that improvements to gamma.sympy.org should go hand-in-hand with improvements to simpify(). Sergiu [0] https://groups.google.com/d/topic/sympy/rGQ8L5Z26Y0/discussion -- You received this message because you are subscribed to the Google Groups "sympy" 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?hl=en.
