Do you mean this?
sage: f = x^2+1 sage: f(x=2) 5 sage: f(2) /Users/wdj/sagefiles/sage-4.1.2.rc2/local/lib/python2.6/site-packages/IPython/iplib.py:2073: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...) exec code_obj in self.user_global_ns, self.user_ns 5 I've not heard of subs being recommended before but it seems to me that using f(x=2) is a good idea, since in many cases other variables might be involved that you might want to leave unevaluated. On Sat, Oct 31, 2009 at 8:35 AM, <[email protected]> wrote: > I'm preparing a talk I'm giving at a local conference next week where I will > be demonstrating Sage. > > I'm wondering about a deprecation warning I've been getting a lot lately. > If I define function, say f(x), and I want to evaluate f(x) at x=2, if I > enter f(2) I get the warning. > > I've been thru the new documentation at http://www.sagemath.org and find > that f.subs(2) is preferred now. Is that right? If so, I am wondering why > this change is being made. Using a method for substitution seems a bit > cumbersome to me. > > HTH, > A. Jorge Garcia > http://calcpage.tripod.com > > Teacher & Professor > Applied Mathematics, Physics & Computer Science > Baldwin Senior High School & Nassau Community College > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
