[Python-Dev] PEP 3144 review.
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Oct 1 02:16:06 CEST 2009
Peter Moody wrote:
> it's useful to take an
> address like 192.168.1.100/24 and derive a bunch of information from
> it (like the network address, broadcast address, containing supernets,
> etc), but still remember that the original address was 192.168.1.100.
> having a separate class or two for this is overly burdensome in my
> mind.
Seems to me what you want isn't so much an IPNetwork that
can optionally have an address, as an IPAddress that can
optionally have a mask, and methods for deriving those
other things from it.
--
Greg
More information about the Python-Dev
mailing list