[Python-Dev] PEP 3144 review.
Steven D'Aprano
steve at pearwood.info
Wed Sep 16 12:52:59 CEST 2009
I've been skimming emails in this thread, since most of them go over my
head and I have no current need for an ipaddress module. But one thing
I noticed stands out and needs commenting on:
On Wed, 16 Sep 2009 11:05:26 am Peter Moody wrote:
> On Tue, Sep 15, 2009 at 6:02 PM, Eric Smith <eric at trueblade.com>
wrote:
> > I completely agree. I don't know of any situation where I'd want a
> > network of "192.168.1.1/24" to be anything other than an error.
>
> when you're entering the address of your nic.
Eric is talking about a network. Peter replies by talking about an
address. Perhaps I'm naive, but surely addresses aren't networks? If
Peter's use-case is to treat addresses and networks interchangeably, I
can't imagine that could be a good thing. Is it? What do the relevant
RFCs say?
As an outsider to this argument, and judging from the lack of agreement
here, it seems to me that some (many? most?) developers who have need
of ipaddress functions are a little unclear about the difference, or
lack thereof, between addresses and networks. Is it our aim to pander
to such confusion, and have a module which will Just Work for such
users, even at the risk of sometimes accepting invalid input. Or is it
to have a module which is strict and forces the user to Do The Right
Thing, even at the cost of being less easy to use?
For what it's worth, it seems to me that it would be better to have a
strict module in the standard lib, and leave the DWIM code to third
parties.
--
Steven D'Aprano
More information about the Python-Dev
mailing list