Status: Accepted
Owner: smichr
Labels: Type-Defect Priority-Medium

New issue 1953 by smichr: inconsistency between "in" and "has"
http://code.google.com/p/sympy/issues/detail?id=1953

There are inconsistent comparisons between quantities in __contains__ and
.has().

eq = Symbol('x')
xr = Symbol('x', real=1)
xr in eq # calls __contains__ which uses "==" for test
True
eq.has(xr) # essentially uses xr in eq.atoms()
False

This could be fixed by making __contains__ use "is" rather than "==".

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

Reply via email to