On 1/17/12 12:11 PM, William Stein wrote:

On Jan 17, 2012 10:06 AM, "Jason Grout" <jason-s...@creativetrax.com
<mailto:jason-s...@creativetrax.com>> wrote:
 >
 > On 1/17/12 12:01 PM, William Stein wrote:
 >
 >> Nils example is interesting though, since it suggests using SR.var
 >> instead of var in preparsing callable symbolic function creation.
 >> E.g., instead of
 >>
 >> sage: preparse('f(x) = 10*x')
 >> '__tmp__=var("x"); f = symbolic_expression(Integer(10)*x).function(x)'
 >>
 >> do
 >>
 >> sage: preparse('f(x) = 10*x')
 >> '__tmp__=SR.var("x"); f =
symbolic_expression(Integer(10)*x).function(x)'
 >
 >
 > Wouldn't that need to be:
 >
 > 'x=SR.var("x"); f = symbolic_expression(Integer(10)*x).function(x)'
 >
 > since x is not injected into the namespace then?
 >

I think it should be __tmp__ on the right instead of x.


If you used x, then you'd automatically have injection in the *local* namespace.

Jason


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