>R. David Murray wrote: > >> A network is conventionally represented by an IP address in which the >> bits corresponding to the one bits in the netmask are set to zero, plus >> the netmask. > >Okay, that's clarified things for me, thanks.
Put another way, an "Address" describes a single end-point and a "Network" describes a set of (contiguous) Addresses. Where things have become confused is that, for practical reasons, it is convenient to have a representation for an Address and it's containing Network (the later can be derived from the Address and a mask). We tried to make the current Network entity do double-duty, but it is just leading to confusion. This is why I proprose there be three entities: * an Address entity (same as the current one) * a Network entity (like now, but requires masked bits to be zero) * an AddressWithMask entity (existing Network, but no container behaviour) There is a school of thought that says we only need a single class that behaves like the current Network entity - end-points are simply represented by an all-ones mask. This is, I think, where we started. But this scheme was rejected. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ _______________________________________________ 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