Re: [Python-Dev] PEP 3144 review.

2009年9月28日 18:29:16 -0700

Peter Moody wrote:
>> Assuming the Network type loses the notion of a specific host (or host 
>> address,
>> or `ip`) attached to it, yes.
> 
> this is "less useful (strictly removing functionality)" and is an
> example of what I explicitly said I was not going to do with ipaddr.
A possible compromise then:
Just change the definition of network equality to only consider the
network address and ignore the ip attribute. Optionally provide a
separate comparison method that pays attention to the ip attribute
(keeping in mind that it isn't particularly hard for people to write out
"net1 == net2 and net1.ip == net2.ip" if they care about the extra state).
Then "IPNetwork" can be largely documented as a true IP network
definition, with the "Host with Netmask" use case handled by having an
IPNetwork object with "net.ip != net.network".
Regards,
Nick.
-- 
Nick Coghlan | [email protected] | Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to