Comment #9 on issue 2389 by [email protected]: Semantic inconsistency between Basic.__contains__ and Tuple.__contains__
http://code.google.com/p/sympy/issues/detail?id=2389

"I talked to Mateusz about this at SciPy, and he thinks, and I agree, that a in b should be equivalent to a in b.args."

Some inconsistency would remain.

In [47]: x=Symbol('x',negative=True)

In [48]: y=Symbol('y',positive=True)

In [49]: y in Interval(x, y, True, True)
Out[49]: False

In [50]: y in Interval(x, y, True, True).args
Out[50]: True

I would simply drop .__contains__() method in Basic.

If one want "x in expr.args", this is not so painful to write, and it is explicit.

--
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