On 06/28/11 09:12, kcrisman wrote: > > Here you probably mean something else. Are you getting a deprecation > warning? > > It's better to define > > a(x) = x > b(x) = 2*x >
I know this for the Sage prompt, but it doesn't work in a Python file because without the preprocessing it tries to evaluate 'a' at 'x'. > The easiest way to do this is to make them a class inheriting from > BuiltinFunction. There are some very good examples in the functions/ > folder. Aha, this is what I needed, thanks. > @symbolicfunction > def f(x): > return some_expression_in_x(x) > > Others have ideas whether this is good/feasible? I'll vote for good, and have no idea re: feasibility. -- 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 URL: http://www.sagemath.org