On 5/11/12 2:31 PM, Robert Bradshaw wrote:
When the declaration warning becomes an error, it will be a bit
better. Certainly an argument for not making all undefined symbols
into symbolic variables. One can write SR("a*x+b") and it defines the
variables for you (though not globally IIRC).
Also, I'm afraid NameError gets raised somewhere in the innards of
Python, so to implement this idea we probably would need to patch
Python.
I bet we could catch this and re-throw a modified version; we have
hooks into the read-eval-print loop to do preparsing, for example.
Changing the NameError assumes that the user wants a symbolic variable.
There is a *lot* more to Sage than symbolic variables, and I would
guess that in many people's typical code, symbolic variables play little
or no part.
How does Matlab handle this? You also have to declare symbolic
variables there, IIRC.
Jason
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org