Comment #15 on issue 1924 by smichr: Eq() gets .as_basic() method
http://code.google.com/p/sympy/issues/detail?id=1924

In reviewing this, Aaron points out that such a routine allows solve to behave in a polymorphic manner. Forget the name for a minute and consider this scenario. I have an economic model object and I want to solve whatever equation corresponds to the model. I call sympy's solve with solve(model, my_param); solve invokes the f.as_foo() method which invokes the as_foo() method of my model. This leaves the code uncluttered of method warts that don't need to concern the reader. So as not to conflict with other modules maybe something Aaron's suggestion is good and something like as_sympy_expr() instead of as_expr() would be best. But...Eq is already an expr so perhaps another name would be better: as_sympy_equation()?

Sympify is not the right thing because it assumes that something can be represented as a sympy object. In the above example perhaps sympify(model) would not make any sense, but the model (knowing that sympy can be used to help with one aspect of it's work) would include the as_foo() method.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to