[Python-Dev] conceptual clarity (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Thu Sep 17 13:58:09 CEST 2009
- Previous message: [Python-Dev] PEP 3144 review.
- Next message: [Python-Dev] conceptual clarity
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Le Thu, 17 Sep 2009 14:30:28 +1200, Greg Ewing a écrit :
3) an Address with an attached Network An Address could be constructed in three ways: Address(ipnumber) Address(ipnumber, network = ) Address(ipnumber, mask = ) # constructs and attaches a suitably-masked Network instance We could also have somenetwork[n] return an Address referring back to the network object it was obtained from.
It seems you are uselessly conflating two perfectly distinct concepts: Address and Network. You also haven't addresses the issue of comparing together (and hashing) two addresses with the same IP but pointing to a different network. No answer to this issue seems satisfactory and obviously right.
As it is, -1 from me. Either we only keep two concepts (Address and Network), or if we introduce a third one (AddressWithMask, whatever) for added practicality; but we shouldn't blur the line between the two former canonical concepts under the pretext that a platypus-like Address might be helpful in some particular situations.
Regards
Antoine.
- Previous message: [Python-Dev] PEP 3144 review.
- Next message: [Python-Dev] conceptual clarity
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]