On 3/12/2015 10:00 AM, Antoine Pitrou wrote: > On Thu, 12 Mar 2015 12:37:16 +0000 > "Loevborg, Soeren Jakob" <soeren.j.loevb...@siemens.com> wrote: >> >>>>> import ipaddress >>>>> ipaddress.IPv4Interface('10.0.0.1/8') + 1 >> IPv4Interface('10.0.0.2/32') >>>>> ipaddress.IPv6Interface('fd00::1/64') + 1 >> IPv6Interface('fd00::2/128') > > Given that the behaviour is unlikely to match any use case, I'd say > it's a bug.
Agreed. > Related issue: > >>>> ipaddress.IPv4Interface('10.0.0.255/8') + 1 > IPv4Interface('10.0.1.0/32') > > Should the result be IPv4Interface('10.0.0.0/8') > (i.e. wrap around)? Should OverflowError be raised? I think it should be an OverflowError. 10.0.1.0/8 makes no sense, and 10.0.0.0/8 is unlikely to be desirable. -- Eric. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com