i was using one global variable to achieve this.
i have modified core->operation-> AssocOp with the version 0.6.5
and sympify('1 + 1',evaluate=False)) was working exactly fine returning
"1+1"
but recently i have shifted to version 0.7.1
Issue is now when i call sympify("2*x+3*x) , this is not even going in to
AssocOp class __new_ method.
and somehow it returns 5*x
could you please tell which class does sympify uses to evaluate Add.
i am kind of stucked here.

On Mon, Oct 3, 2011 at 9:13 PM, Aaron Meurer <[email protected]> wrote:

> Currently there is not, but I don't think it would be very difficult
> to add the behavior in as a global parameter at least.  If you want to
> just make it an option to sympify (like sympify('1 + 1',
> evaluate=False)), I don't know how difficult that would be, since the
> parser would have to be modified, but it should be doable.  But we
> definitely would accept a patch that does so. Please open an issue for
> it in any case.
>
> As for multiplying by something causing an unevaluated expression to
> evaluate, I consider this to be a bug.  It no longer does it in master
> with 1 (because the constructor ignores the identity), but it will
> still do it with any other number.
>
> Aaron Meurer
>
> On Sun, Oct 2, 2011 at 10:44 PM, gsagrawal <[email protected]> wrote:
> > yes , i am facing the same problems.
> > specially when you try to convert a string format user input into a valid
> > sympy expression using simpify(expr) which internally calls Add and Mul
> with
> > default parameter (evaluate=true). is there any way to control this ?
> > On Mon, Oct 3, 2011 at 2:44 AM, Gabor Takacs <[email protected]>
> wrote:
> >>
> >> Hi,
> >>
> >> I experienced that sympy applies automatic evaluation at expression
> >> creation by default
> >> (the evaluate parameter is True in the constructors).
> >>
> >> Therefore, e.g.
> >> - I**3 evaluates to -I
> >> - Pow(I, 3, evaluate=False) evaluates to I**3, but
> >>  Pow(I, 3, evaluate=False) * 1 evaluates to -I
> >>
> >> Is it possible to change the default behaviour to "no automatic
> >> evaluation at expression creation"?
> >> (so that I**3 evaluates to I**3)
> >>
> >> Gabor
> >>
> >> --
> >> 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.
> >
>
> --
> 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