import functools
+import types
IPV4LENGTH = 32
IPV6LENGTH = 128
return (self.network_address.is_loopback and
self.broadcast_address.is_loopback)
+ __class_getitem__ = classmethod(types.GenericAlias)
class _BaseV4:
return '%s/%s' % (self._string_from_ip_int(self._ip),
self.hostmask)
+ __class_getitem__ = classmethod(types.GenericAlias)
+
class IPv4Network(_BaseV4, _BaseNetwork):
def is_loopback(self):
return self._ip == 1 and self.network.is_loopback
+ __class_getitem__ = classmethod(types.GenericAlias)
+
class IPv6Network(_BaseV6, _BaseNetwork):
)
from collections.abc import *
from contextlib import AbstractContextManager, AbstractAsyncContextManager
+from ipaddress import IPv4Network, IPv4Interface, IPv6Network, IPv6Interface
from itertools import chain
from os import DirEntry
from re import Pattern, Match
Mapping, MutableMapping, MappingView,
KeysView, ItemsView, ValuesView,
Sequence, MutableSequence,
+ MappingProxyType,
+ DirEntry,
+ IPv4Network, IPv4Interface, IPv6Network, IPv6Interface,
MappingProxyType, DirEntry,
chain,
):