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
I'm not sure if it fits your needs, but we are very happy with calling c
libs directly from python using ctypes:
https://docs.python.org/2/library/ctypes.html
It requires a few extra lines in Python to handle the parameter and
return types.
import ctypes
result = ctypes.windll.Hello.hello()
Hi ...
That's great and you're one person with enough /Intelligence/ to
participate in the projects I described you.
You can think about the solution, logs , how the information is
organized,etc.
You're certainly one of the persons!
I'm not writing more ...
I have been on this mail
with the project in any way, and I can't find a
way to download the entire thing in one go. So if you do salvage a
working copy please let me (and the rest of the community) know.
//Søren - Peng - Pedersen
--
http://mail.python.org/mailman/listinfo/python-list