'Returns a string which can be used to reconstruct this iprange.'

def __repr__(self):

    rv = []
    for (start, stop) in self._ranges:
        if ((stop - start) == 1):
            rv.append(('%r' % (self._int2ip(start),)))
        else:
            rv.append(('(%r,%r)' % (self._int2ip(start), self._int2ip((stop - 1)))))
    return ('%s(%s)' % (self.__class__.__name__, ','.join(rv)))
