On Mon, 28 Sep 2009 at 22:32, Antoine Pitrou wrote:
Le lundi 28 septembre 2009 ?? 22:11 +0200, "Martin v. L??wis" a ??crit :
That's not the question that was asked, though - the question asked
was "Under what circumstances would I want to specify...". I hope
most people agree that it is desirable to be able to specify a network
not just by its network address.
To me it makes no sense to "specify a network not just by its network
address", because by definition a prefix + mask is all that
characterizes a network: that's all you need to specify it entirely.
Adding a "base address" would be like adding a "port number" attribute
to the Address class: it's abusing an existing class by adding
irrelevant information.
I may be mistaken, but it seems to me that, in the IP world, nowhere
does such a "network + host" hybrid appear. You find networks (prefix +
mask) in routing protocols, and host addresses in applicative protocols.
You do find "address plus mask" when specifying an IP address for an
interface. This is a shorthand for specifying the IP address plus the
network, since the network can be derived from the IP plus the mask.
But it is a _shorthand_, it isn't an entity in its own right. There is
no such thing as "a network that has an IP", there is only an
_interface configuration_ that has an IP _and_ an associated network.
--David
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com