[Python-Dev] PEP 3144 review. (original) (raw)

Stephen J. Turnbull stephen at xemacs.org
Sun Sep 27 17:09:44 CEST 2009


Antoine Pitrou writes:

There was a proposal to have a separate parse_address_and_mask method which would return a (Address, Network) tuple, I still don't know why you don't seem to consider it seriously, rather than trying to make the Network class a kind of all-in-one type conflating different concepts.

Because he thinks about the problem space differently from you. Specifically, AFAICS he does not (maybe even "can't") see a reason to distinguish an AddressWithMask from a Network. If so, it's a reasonable API choice for him to choose not to have separate classes to represent such similar concepts. That's all there is to it.

I personally do not have a problem with that, except that you apparently can't grasp his way of thinking, and he apparently can't grasp yours. I'm -1 on PEP 3144 primarily because of this communications gap.

Secondarily because I agree that it's unnatural that a Network instance can have an arbitrary distinguished address other than those defined in the RFCs (the network and broadcast addresses), especially since it matters to equality comparisons. (But I personally would use ipaddr if it were in the stdlib despite that.)



More information about the Python-Dev mailing list