See also the idea at http://code.google.com/p/sympy/issues/detail?id=2738.

Aaron Meurer

On Fri, Dec 23, 2011 at 7:33 AM, Chris Smith <[email protected]> wrote:
>
>
> On Fri, Dec 23, 2011 at 8:08 PM, gsagrawal <[email protected]> wrote:
>>
>>
>> Try k=Add(x,x,evaluate=False)
>> print k  # prints x+x
>> print -k  # prints -2*x
>>
>> As in __neg__ function it do Add(*args) again.
>>
>>
>> It seems somewhere sympy is limited in evaluate=False part.
>> I think we should have one property IsEvaluated in expr class.
>> So all the functions (like __neg__) can use that while forming the
>> expression again .
>>
>>
>
> Yes, this is a known issue and there has been some discussion
> in http://groups.google.com/group/sympy/browse_thread/thread/56015fa6bad18051/358687f02c0bb8d3?lnk=gst&q=Hold#358687f02c0bb8d3 about
> implementing a Hold function. cse, btw, uses a temporary class Sub to
> represent a subtraction which it then locates again later to "undo" what it
> did in the preprocessing step.
>
> ( btw, I am using the most current version of sympy. )
>
> --
> 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