Hello,

On Sun, Feb 21, 2010 at 12:03 PM, bsdz <blai...@googlemail.com> wrote:
> I used to be able to obtain a function name in Sage 3+ using something
> like the following: -
>
> fu = function('fu', x)
> print fu._f._name
> # would print "fu"
>
> I notice that this does not work in Sage 4 and "fu" is no longer a
> SymbolicFunctionEvaluation but an Expression.
>
> Is there a way to obtain the function's name in the above?

Note that "fu" as defined above creates the function "fu" and then
applies it to x.  If you leave out the x, then you get the function
itself which has a name method.  If you have fu(something), then you
can use the operator method on that to get the function back:

sage: fu = function('fu')
sage: fu.name()
'fu'
sage: fu(x).operator().name()
'fu'

--Mike

-- 
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

Reply via email to