Ask Your Question

Revision history [back]

This is not a bug, SR.var('a') returns the symbol "a" without touching the namespace, while var('a') both returns the symbol "a" and lets the Python name a points to that symbol. You can do:

sage: a = SR.var('a')                                                                                                                                                                                        
sage: a                                                                                                                                                                                                      

or to see the difference between the symbol and the Python name that points to it:

sage: b = SR.var('a')                                                                                                                                                                                        
sage: b                                                                                                                                                                                                      
sage: b+b