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

New issue 3112 by [email protected]: Interval has non-Basic args
http://code.google.com/p/sympy/issues/detail?id=3112

Interval stores bools in its args, which causes problems such as:

In [1]: Interval(0, 1).free_symbols
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/home/ronan/dev/sympy/<ipython-input-1-b6834b9d186c> in <module>()
----> 1 Interval(0, 1).free_symbols

/home/ronan/dev/sympy/sympy/core/basic.pyc in free_symbols(self)
    599         method."""
    600         union = set.union
--> 601 return reduce(union, [arg.free_symbols for arg in self.args], set())
    602
    603     def is_hypergeometric(self, k):

AttributeError: 'bool' object has no attribute 'free_symbols'

This is an instance of issue 2070, and issue 2531 isn't a real solution as .left_open and .right_open don't actually have a symbolic interpretation.

One (not terribly clean) way of dealing with this would be to create 4 subclasses - one each combination of (left_open, right_open).

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