'Test if the address is a loopback address.
Returns:
A boolean, True if the address is a loopback address as defined in
RFC 2373 2.5.3.'

@property
def is_loopback(self):

    if isinstance(self, IPv6Network):
        return ((int(self.network) == 1) and (getattr(self, '_prefixlen', 128) == 128))
    elif isinstance(self, IPv6Interface):
        return ((int(self.network.network_address) == 1) and (getattr(self, '_prefixlen', 128) == 128))
    return (self._ip == 1)
