There's probably a better way, but this works: sage: f = function('hello',x) sage: f._f._name 'hello'
(That's just what f._repr_() uses.) -cc On Tue, Apr 28, 2009 at 8:30 PM, Alex Raichev <tortoise.s...@gmail.com> wrote: > > Hi all: > > How do you retrieve the name of a callable symbolic function as a > string? For instance, suppose you have > > sage: f= function('hello',x) > > and you want to retrieve 'hello' from f. > > sage: str(f) > '\n hello(x)' > > followed by stripping away the extra characters works, but is there a > more direct approach? > > Alex > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---