[Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library

Nick Coghlan ncoghlan at gmail.com
Wed Aug 19 23:24:12 CEST 2009

Glyph Lefkowitz wrote:
> -1.  I think 'network.number' or 'network.zero' is a lot clearer than
> 'network.network'.  Maybe '.broadcast' would be okay, as long as it
> /can/ be adjusted for those unusual, or maybe even only hypothetical,
> networks where it is not the [-1].

Maybe this is something that differs by country, but I have *never*
heard the first address in an IP network (i.e. every bit not covered by
the netmask set to zero) referred to as anything other than the "network
address". Similarly, the last address (every bit not covered by the
netmask set to one) is referred to as the "broadcast address", even if
the relevant RFCs don't actually guarantee that.

Anyone tasked to deal with a network that is sufficient unusual to break
those two conventions is almost certainly going to have bigger problems
than the proposed meanings for ipnet.network and ipnet.broadcast not
giving the correct answer for their specific situation.

And if someone does need to deal with that, then they create an
appropriate subclass or use a less lightweight IP addressing library.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list