[Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library
Nick Coghlan
ncoghlan at gmail.com
Wed Aug 19 23:17:04 CEST 2009
Glyph Lefkowitz wrote:
> It is unusual, but frankly, needing to actually do operations on
> broadcast addresses at all is also a pretty unusual task. Broadcast
> itself is a somewhat obscure corner of networking. I suspect that in
> many deployments that need to write significant code to deal with
> broadcast addresses, rather than the usual default stuff, funky
> configurations will actually be quite common.
>
> I would not be surprised to find that there are still some 4.2BSD VAXes
> somewhere doing something important, and some Python may one day be
> called upon to manage their networks.
If using a custom broadcast address rather than the standard one, don't
use the ipnet.broadcast property?
I'm with Martin and the PEP author here - the property can quite happily
just use the conventional meaning without causing any real problems.
People doing something more unusual will still be free to either create
an appropriate IPAddress instance or else create an IPNetwork subclass
that defines the broadcast property differently (e.g. making it the same
as the network address).
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
More information about the Python-Dev
mailing list