Here is a proposed behavior available in my 1694ms branch that
converts solve to a wrapper that returns an iterator of multiset/
dictionary solutions after getting a solution from solve. I won't
start changing tests unless we can agree that this is a good step
forward.

   >>> from sympy import *
   >>> var('x y')
   (x, y)

no solution
   >>> for s in solve(3, x):
   ...   print s
   ...

one eq and one sol
   >>> for s in solve(x-3):
   ...  print s
   ...
   {x: 3}

one eq multiple solutions
   >>> for s in solve(x**2-4):
   ...  print s
   ...
   {x: 2}
   {x: -2}

multi equations
   >>> xis=2;yis=3
   >>> from sympy.solvers.solvers import solve, _solve

with one solution
 without explicit symbols given
   >>> for s in solve([x + y - (xis + yis), x - y - (xis - yis)]):
   ...  print s
   ...
   {x: 2, y: 3}
 with explicit symbols given
   >>> for s in solve([x + y - (xis + yis), x - y - (xis - yis)], y,
x):
   ...   print s
   ...
   {x: 2, y: 3}

with multi solutions
   >>> eqs = [x**2 + y - (xis**2 + yis), x - y**2 - (xis - yis**2)]
   >>> for s in solve(eqs, y, x):
   ...   print s
   ...
   {x: 1/2 + 29**(1/2)/2, y: 7 - (1/2 + 29**(1/2)/2)**2}
   {x: -3, y: -2}
   {x: 1/2 - 29**(1/2)/2, y: 7 - (1/2 - 29**(1/2)/2)**2}
   {x: 2, y: 3}
 check them
   >>> for s in solve(eqs):
   ...   [e.subs(s).n(3, chop=True) for e in eqs]
   ...
   [0, 0]
   [0, 0]
   [0, 0]
   [0, 0]

/c

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

Reply via email to