Sage also allows the creation of variables with other illegal names (e.g. '1a' or '1'), but for these at least reset() still works. There are two ways to fix this, the first is to disallow the creation of such variables via var(), but then all illegal cases would have to be taken care of, and it wouldn't help if you created illegal variables manually by inserting them into globals() (but I would argue that if you do this, you're on your own anyway). The second way to fix the behaviour above would be to make reset() able to delete empty variables too. This however is only viable if these variables don't break anything else, other than the case mentioned above.

Oldest firstNewest firstThreaded

Show property changes

Change History (5)

Perhaps one could add a warning message giving a hint in other cases, too.

From #sage-devel (IRC):

<cousteau> weird, I can't make the notebook display the same that real LaTeX
I have a variable which I called {m}: var('{m}') In real LaTeX, it nicely displays as an m, but in the notebook it keeps the braces
same for a variable called \mu\Omega
does the notebook just get the latex() of the variables? or does it do something else?
var('sui', latex_name="s_{u,i}") :'( I shoild read the manual first