On Sat, Jan 04, 2014 at 08:11:41AM -0800, Harsh Gupta wrote:
>    In sympy/core/sets.py:
> 
>  >          # TODO: manage left_open and right_open better in case of
>  > -        # non-comparable left/right (e.g. Interval(x, y))
>  > -        _left, _right = f(self.left), f(self.right)
>  > -        left, right = Min(_left, _right), Max(_left, _right)
>  > -        if _right == left: # switch happened
>  > -            left_open, right_open = self.right_open, self.left_open
>  > +        # non-comparable left/right (e.g. Interval(x, y)
>  > +        # TODO: handle piecewise defined functions
>  > +
>  > +        _start, _end = f(self.start), f(self.end)
>  > +        if self.left_open:
>  > +            _start = limit(f.expr, f.variables[0], self.start, dir="+")
> 
>    It is necessary to use limits to evaluate the value of the function at the
>    edge of the interval if it is not a closed interval from that side.

Only in *that* case?  No.  As you allow
singularities - f(self.left) and/or f(self.right) may not
have any sense.

>    Because the limiting value of the function at point might be different
>    from the value of the function at that point. For example evaluating
>    without limits gives wrong result in this case:
> 
>  In [4]: imageset(x, 1/x, Interval(-1, 0, True, True))
>  Out[4]: (-1, oo)

And that's a good example of the above point.