Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium Assumptions Core Sets
New issue 3564 by julien.r...@gmail.com: Set.contains() throws
AttributeError
http://code.google.com/p/sympy/issues/detail?id=3564
I got an AttributeError when checking if a nonnegative number is in the
interval 0..inf. The error does not occur if the assumption negative=False
is removed from the symbol, resulting in m >= 0.
$> cat my/test_interval.py
from sympy import Interval, Symbol, oo
m = Symbol("m", negative=False)
print Interval(0, oo).contains(m)
$> python my/test_interval.py
Traceback (most recent call last):
File "my/test_interval.py", line 5, in <module>
print Interval(0, oo).contains(m)
File "my/sympy/core/sets.py", line 191, in contains
return self._contains(sympify(other, strict=True))
File "my/sympy/core/sets.py", line 626, in _contains
expr = And(expr, other < self.end)
File "my/sympy/core/operations.py", line 421, in __new__
_args = frozenset(cls._new_args_filter(args))
File "my/sympy/core/operations.py", line 441, in _new_args_filter
elif arg.func == cls:
AttributeError: 'NoneType' object has no attribute 'func'
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-issues@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.