On 9/7/10 4:04 PM, Nils Bruin wrote:
On Sep 7, 1:34 pm, tvn<[email protected]> wrote:
Hi John and Jason, thanks -- the inject_variables() did what I
want.
I have another question below and hope you can help
what if I already have create a function call f = x - y as below
sage: vs = var('x y')
sage: f = x - y
sage: type(f)
<type 'sage.symbolic.expression.Expression'>
The expression f is not a function, but a symbolic expression. It is
callable, though
sage: f(x=1,y=1)
0
sage: g(x,y)=x-y
sage: type(g)
<type 'sage.symbolic.expression.Expression'>
OK, so that doesn't give it away.
This does:
sage: g.parent()
Callable function ring with arguments (x, y)
But:
sage: g(1,1)
0
(Note that there is no need to specify the names of the variables. Try
that with f and you'll get a deprecation warning.)
I'm working on removing this functionality, as the deprecation has been
in Sage for well over a year.
Thanks,
Jason
--
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
URL: http://www.sagemath.org