Replies: 2 comments 1 reply
-
I think it would be better just to use
Then it is clear what the variable name is rather than needing to figure out what rules Generally I would discourage the use of |
Beta Was this translation helpful? Give feedback.
-
I think that a better approach would be to register an ipython magic command: This is something that SymPy could do at start up somehow. Then you should be able to do e.g.
and the idea would be that this would be equivalent to something like
|
Beta Was this translation helpful? Give feedback.
-
Hello,
the
var()
function is used to create a symbol and then inject it into the current framework as a variable with the same name.Symbol
object can be define with invalid characters that would raise syntax error if try to use directly, for example:The object are valid Symbols, but can't be accessed directly
It would be nice if there would be an option to escape invalid characters with safe ones, possibly customizeable by the user (e.g. a list of regex).
As it stand right now
var(names, **kwargs)
pass thenames, **kwargs
to thesymbol()
, which returns a list ofSymbol
s (all fine). For the actual namespace injection it callsSymbol.name
to retrieve the string representation of the symbolI propose to add as argument a list of substitution such as:
In my case I would like the to use the convention to substitute
{
}
with empty space, and,
with a_
:Beta Was this translation helpful? Give feedback.
All reactions