#7496: symbolic variable names should be valid identifiers, or ridiculousness
follows
-------------------------------------------------+--------------------------
Reporter: was | Owner: burcin
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.7.1
Component: symbolics | Keywords: sd31
Work_issues: | Upstream: N/A
Reviewer: Karl-Dieter Crisman, Volker Braun | Author: Volker
Braun, Karl-Dieter Crisman
Merged: | Dependencies:
-------------------------------------------------+--------------------------
Changes (by kcrisman):
* status: needs_review => needs_work
Comment:
Replying to [comment:11 vbraun]:
> Somehow I'm not surprised that somebody used invalid identifiers as
variable names ;-)
So this actually found a bug of sorts - nice. Though I have to say that
trying to go between the Maxima way of all variables automatic and the
Sage way of (nearly) none gave the folks who put that file together quite
a challenge, so I don't blame them too much. But the code is not so
elegant, in retrospect.
What's particularly bizarre about this is that in the old and the new
cases, `fast_float` is being passed something with three arguments, so it
still behaves properly - even though the third thing is an iterable in
both cases! Probably the "right" fix is to just do `'t_'+str(dvar)` for
the first dvar only; fast_float just needs something different from the
dependent variables. But I think that would be another ticket, as this
doesn't break anything (and the plots still look the same).
Anyway, it fixes the test, doesn't seem to introduce any new bugs.
However, the update to allowing whitespace probably still needs work.
Maybe we need to special-case the situation where there is only whitespace
in the string passed to `var`:
{{{
sage: var(' ')
sage: a = var(' ')
sage: a
sage: type(a)
<type 'sage.symbolic.expression.Expression'>
}}}
Sorry :(
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7496#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.