@classmethod
def from_reader(cls, stream):
    """Return an Interval from a stream of strings and numbers.

        Parameters
        ----------
        stream : iterator of str, int, and float
            Iterator that yields two numbers and a string, giving the
            xmin, xmax, and text parameters for this Interval.

        Returns
        -------
        Interval

        """
    xmin = next(stream)
    xmax = next(stream)
    text = next(stream)
    return cls(xmin, xmax, text)
