On Tuesday, 1 December 2015 15:52:56 UTC+1, Riccardo Rossi wrote:
>
> Dear Jason,
>
> i think i explained myself badly
>
> imagine i have
>
> a = Symbol('a')
> a = sqrt(2)+1
>
>
the second statement "overwrites" the first, that's just how Python (and 
any other programming language that comes to mind) works.
Maybe you want to do something like this?:

In [1]: a_symb = Symbol('a')

In [2]: a_expr = sqrt(2) + 1

In [3]: ccode(a_expr, assign_to=a_symb)
Out[3]: 'a = 1 + sqrt(2);'



-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/833000b6-baca-4d13-8f50-6e889f8c47cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to