This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pmoody
Recipients Rhamphoryncus, benjamin.peterson, claymation, ezio.melotti, giampaolo.rodola, gregory.p.smith, gvanrossum, loewis, mattsmart, oubiwann, pitrou, pmoody, pnasrat, r.david.murray, shields
Date 2009-06-02.01:03:17
SpamBayes Score 1.22651e-06
Marked as misclassified No
Message-id <>
In-reply-to <>
On Mon, Jun 1, 2009 at 5:47 PM, Clay McClure <> wrote:
> Clay McClure <> added the comment:
> On Mon, Jun 1, 2009 at 4:54 PM, Martin v. Löwis <> wrote:
>> Do you have an application in mind where this lack of distinction
>> would prevent writing the application in a straight-forward way?
>> IOW, could you do something if they were distinct that you can't
>> do because they are not?
> Consider applications that use ipaddr.IPv4 objects to configure
> network interfaces:
> ifconfig: bad value
> That's because ipaddr wrongly appends a prefix length to all
> ipaddr.IPv4 objects, even those representing addresses, which do not
> have prefix lengths.

I'm not sure what you're trying to do here, can you elaborate?

> Consider applications that need to validate addresses (or networks,
> but not both) supplied as user input:
> address = ipaddr.IP(input)
> if isinstance(address, ipaddr.IPv4):
>    if address.prefixlen != 32:
>        raise TypeError("Expecting IP address, not network")
> elif isinstance(address, ipaddr.IPv6):
>    if address.prefixlen != 128:
>        raise TypeError("Expecting IP address, not network")

i'm not sure what's onerous about this code.  you're missing a
try/except around ipaddr.IP(), but otherwise it seems fine.

> Given its myriad quirks, it is really rather surprising that ipaddr is
> being considered for inclusion in the Python stdlib.

it's actually already been included, but that's beside the point.  I'm
now asking you a second time to submit bug reports if there are issues
which you see; perhaps these 'myriad of quirks' can be fixed, perhaps
not.  yelling here doesn't actually do anything productive.

> Clay
> ----------
> _______________________________________
> Python tracker <>
> <>
> _______________________________________
Date User Action Args
2009-06-02 01:03:20pmoodysetrecipients: + pmoody, gvanrossum, loewis, gregory.p.smith, Rhamphoryncus, pitrou, giampaolo.rodola, benjamin.peterson, ezio.melotti, mattsmart, shields, pnasrat, r.david.murray, oubiwann, claymation
2009-06-02 01:03:18pmoodylinkissue3959 messages
2009-06-02 01:03:18pmoodycreate