we found is &lt; start then end must be &gt; start, otherwise (if starts are same)
            # end must be &gt;= start
            for intvl in self._by_start.irange(maximum=(end, sys.maxsize, sys.maxsize)):
                if intvl[0] &lt; start and intvl[1] &gt; start:
                    yield intvl
                elif intvl[0] == start and intvl[1] &gt;= start:
                    yield intvl
        else:
            # check all intervals which start before then end of the given span: if they would
