If solve is called with list containing a single variable and 
solution_dict=True, the code tries to iterate over the solution, but can't 
because it is not an Expression rather than a list of expressions.  As an 
example,

solve(x, [x], solution_dict=True)

The problem occurs at the end of _solve_expression (at line 1260 of 
src/sage/symbolic/relation.py):

if solution_dict:
        if isinstance(x, (list, tuple)):
            X = [{sol.left():sol.right() for sol in b} for b in X]
        else:
            X = [dict([[sol.left(),sol.right()]]) for sol in X]

(x is what solve is requested to solve for and X is the set of solutions).  
But if only a single variable is passed, each b in X is an Expression such 
as x == 0, hence the for sol in b fails.

Jacob

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to