Søren Løvborg added the comment:
As mentioned python-dev, I'm not entirely sold on raising an exception on
overflow.
To recap the mailing list discussion, there was general agreement that the
current behavior is a bug, suggesting that there's no need to go through the
depreciation process
Søren Løvborg added the comment:
I take it the silence means that the patch is neither obviously good nor
obviously bad. :-)
It all comes down to a judgment call: is this a bug, or expected (but
undocumented) behavior?
In PEP 387 lingo: Is this a reasonable bug fix? Or is it a design mistake
New submission from Søren Løvborg:
Addition and subtraction of integers are documented for ipaddress.IPv4Address
and ipaddress.IPv6Address, but also work for IPv4Interface and IPv6Interface
(though the only documentation of this is a brief mention that the Interface
classes inherit from
Søren Løvborg added the comment:
Proposed implementation patch attached. If this has any interest, I'll look
into expanding the patch to include documentation and unit tests.
Resulting behavior:
import ipaddress
ipaddress.IPv4Interface('10.0.0.1/8') + 1
IPv4Interface('10.0.0.2/8