New submission from John Florian <jflorian.double...@gmail.com>:
The docs say """The meaning of address is as in the constructor of IPv4Network, except that arbitrary host addresses are always accepted.""" However, that doesn't seem to be entirely true: >>> tup1 = ('192.168.123.234', 24) >>> tup2 = ('192.168.123.234', '255.255.255.0') >>> IPv4Network(tup1, strict=False) IPv4Network('192.168.123.0/24') >>> IPv4Network(tup2, strict=False) IPv4Network('192.168.123.0/24') >>> IPv4Interface(tup1) IPv4Interface('192.168.123.234/24') >>> IPv4Interface(tup2) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.7/ipaddress.py", line 1391, in __init__ self._prefixlen = int(address[1]) ValueError: invalid literal for int() with base 10: '255.255.255.0' ---------- messages: 335474 nosy: John Florian priority: normal severity: normal status: open title: ipaddress.IPv4Interface won't accept 2-tuple (address, mask) versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35990> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com