'Emulate numeric objects through network aggregation'

def __add__(self, other):

    if (self.prefixlen() != other.prefixlen()):
        raise ValueError('Only    networks    with    the    same    prefixlen    can    be    added.')
    if (self.prefixlen < 1):
        raise ValueError("Networks    with    a    prefixlen    longer    than    /1    can't    be    added.")
    if (self.version() != other.version()):
        raise ValueError('Only    networks    with    the    same    IP    version    can    be    added.')
    if (self > other):
        return other.__add__(self)
    else:
        ret = IP(self.int())
        ret._prefixlen = (self.prefixlen() - 1)
        return ret
