Hi:
I am probably missing something basic, but I cannot
find the way to recover the name of a function. For example,
x = var('x')
f = function('hello', x)
I'd like a method (name, say) which returns the
string "hello", so something like:
sage: f.name()
'hello'
should work. My ugly hack is the following:
sage: x = var('x')
sage: f = function('hello', x)
sage: f(x)
hello(x)
sage: vars = [f,x]
sage: name = vars[0]._repr_()[0:(len(vars[0]._repr_())-2-len(str(vars[1])))]
sage: name
'hello'
(I think such a method is needed to wrap maxima's "atvalue" command.)
- David
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---