Louie Lu added the comment: The document here says: https://docs.python.org/3/library/ipaddress.html#interface-objects
""IPv4Interface is a subclass of IPv4Address"" trying with: >>> ipaddress.IPv4Address(('192.168.128.0', '255.255.255.0')) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.6/ipaddress.py", line 1284, in __init__ self._ip = self._ip_int_from_string(addr_str) File "/usr/lib/python3.6/ipaddress.py", line 1118, in _ip_int_from_string raise AddressValueError("Expected 4 octets in %r" % ip_str) ipaddress.AddressValueError: Expected 4 octets in "('192.168.128.0', '255.255.255.0')" So the behavior of IPv4Interface seem to be correct? ---------- nosy: +louielu _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29890> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com