Move invtrig tests from test_functions.py to test_trigonometric.py
[sympy.git] / sympy / core / interval.py
blob16de070614d19372a80eaa0735c54655b9474bee
2 from basic import Basic
4 class Interval(Basic):
6 def __new__(cls, start, end, **assumptions):
7 start = Basic.sympify(start)
8 end = Basic.sympify(end)
9 return Basic.__new__(cls, start, end, **assumptions)
11 @property
12 def start(self):
13 return self._args[0]
15 @property
16 def end(self):
17 return self._args[1]
19 def tostr(self, level=0):
20 r = '[%s, %s]' % (self.start, self.end)
21 if self.precedence <= level:
22 r = '(%s)' % (r)
23 return r