calcp...@aol.com 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 > <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. >
Not to belabor the point, but David Joyner is right about his reasons. You see the problem more clearly with two variable functions: f=x+y^2 Now, should f(2) mean f(x=2) or f(y=2)? What about: f=y+x-y Should f(2) mean f(x=2) or f(y=2)? In each of these cases, there is ambiguity. So we decided to make sure the user is explicit. You can either do: f(x,y) = y+x-y f(2) (in other words, you specifically give the order of arguments to f) or f(x=2) (you specifically tell Sage what you want substituted). You can also do f.subs(x=2) if you want. Thanks, Jason -- Jason Grout --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---