On Mon, 26 Apr 2010 08:48:26 -0700 (PDT)
Ryan Hinton <[email protected]> wrote:

> I'm using variable names with non-alphanumeric characters for
> convenience.  (Longer story: I have variables with two vector
> subscripts.)  Should the following be supported?
> 
> sage: nn = var('n(0.1)(3.)')

The variable names should just be valid python identifiers. There is
already a ticket for this:

http://trac.sagemath.org/sage_trac/ticket/7496

Unfortunately, I couldn't find a simple way to check if something is
indeed a "valid identifier" (including unicode characters etc. as well).
Python 3 seems to have a function for this, but it will be a long time
before we can migrate to that.

> Creating expressions using ``nn`` seems to work fine -- as long as
> everything stays in Sage.  But when I try to do some non-trivial
> equality comparisons, Sage punts the decision to Maxima, which chokes
> on the variable name.  For example,
> 
> sage: maxima(nn+2)
<snip error message>

You can open a ticket for this. Even if we fix the ticket above, it
would be good to know what characters in a symbol name need to be
escaped and implement that in the conversion to maxima.


Thank you.

Cheers,
Burcin

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to