In the end, the answer is "use evaluate=False with the addends:
>>> Add(2,3,x,2*x,evaluate=False)
x + 2*x + 2 + 3
If you must use a string then this it is as complicated as identifying the
addends in the string. If you only use "+" to separate addends then
>>> Add(*[S(a) for a in "2+3 + x + 2*x".split("+")], evaluate=False)
x + 2*x + 2 + 3
/Chris
On Wed, May 29, 2013 at 11:26 AM, Abhishek kumawat <
[email protected]> wrote:
> Hii,
> I want to convert "2+4 + 45+ 2*x + x + x**2" string into sympy object
> without AutoSimplification. I used both sympify and kernS.
> But they automatically simplifies and returns "3*x + x**2 + 51"
>
> How to convert the string into sympy object without simplification.
>
> Thanks,
> Abhishek
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.