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.

Aaron Meurer

On Sat, Mar 17, 2012 at 7:12 PM, smichr <[email protected]> wrote:
> If we allow sympify to remove spaces then one can sympify an
> expression like
>
>    >>> S('distance travelled/time travelled')
>    distancetravelled/timetravelled
>
> Is that ok?
>
> --
> 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.
>

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

Reply via email to