On 13 mai, 18:36, Dave Parker <[EMAIL PROTECTED]> wrote: (snip) > Also, in Python how do you assign a symbolic equation to a variable? > Like this? > > QuadraticEquation = a*x^2 + b*x + c = 0
quadratic_equation = lambda x, b, c : a*(x**2) + b*x + c == 0 or if x, b and c are supposed to be captured from the current namespace: quadratic_equation = lambda : a*(x**2) + b*x + c == 0 > Set statements avoid the confusion of multiple equal signs when > manipulating symbolic equations: using '=' for assignement and '==' for equality test does the same thing. And it's a very common pattern in programming languages. -- http://mail.python.org/mailman/listinfo/python-list