[Python-Dev] PEP 3144 review.

R. David Murray rdmurray at bitdance.com
Tue Sep 15 16:36:08 CEST 2009


On Tue, 15 Sep 2009 at 14:28, Antoine Pitrou wrote:
> Andrew McNamara <andrewm <at> object-craft.com.au> writes:
>>
>>    >>> ipaddr.IPv4Network('192.168.1.1/16').network
>>     IPv4Address('192.168.0.0')
>
> Er, does this mean that taking the `network` attribute from a network object
> actually gives an address object (not a network)?
> It looks horribly misleading to me.

That was my opinion, too.  I've always called that number the 'zero'
of the network, but other people said that it is usually called the
'network'.

I also find it odd to see a 'network' with an IP address of 192.168.1.1.
That looks like a host-address-plus-netmask to me, not a network
address.

--David


More information about the Python-Dev mailing list