Ask Your Question

Getting symbolic variable without resetting python variable.

asked 2016-04-01 16:11:17 -0500

rlg23 gravatar image

When calling


the variable x gets set to the symbolic expression x just as if we had called

x = var('x')

In particular, any value stored in x is deleted. Is there a way to get a symbolic variable without setting the python variable to be that symbolic variable? I'm not super familiar with how sage handles symbolic variables so this might be unreasonable.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-04-01 17:52:40 -0500

vdelecroix gravatar image

updated 2016-04-01 17:53:10 -0500

Yes there is

sage: t = 19
sage: my_variable = SR.var('t')
sage: t
sage: my_variable

The behavior of var is very strange and controversial.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-04-01 16:11:17 -0500

Seen: 70 times

Last updated: Apr 01 '16