'Return a representation of this integer set. The representation is
executable to get an equal integer set.'

def __repr__(self):

    rv = []
    for (start, stop) in self._ranges:
        if (isinstance(start, six.integer_types) and isinstance(stop, six.integer_types) and ((stop - start) == 1)):
            rv.append(('%r' % start))
        elif isinstance(stop, six.integer_types):
            rv.append(('(%r,%r)' % (start, (stop - 1))))
        else:
            rv.append(('(%r,%r)' % (start, stop)))
    if (self._min is not _MININF):
        rv.append(('min=%r' % self._min))
    if (self._max is not _MAXINF):
        rv.append(('max=%r' % self._max))
    return ('%s(%s)' % (self.__class__.__name__, ','.join(rv)))
