| 1 | initial version |
I agree that f.subs(a == 3) is bad syntax and should probably be deprecated. For substitutions, it is much clearer to use a Python dictionary:
sage: a, b = var('a b')
sage: f = a*x + b
sage: f.subs({a: 3, b: -2})
3*x - 2
| 2 | No.2 Revision |
I agree that f.subs(a == 3) is bad syntax and should probably be deprecated. For substitutions, it is much clearer to use a Python dictionary:
sage: a, b = var('a b')
sage: f = a*x + b
sage: f.subs({a: 3})
b + 3*x
sage: f.subs({a: 3, b: -2})
3*x - 2
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.