[Python-Dev] PEP 3144 review.
R. David Murray
rdmurray at bitdance.com
Wed Sep 30 04:12:54 CEST 2009
More information about the Python-Dev mailing list
Wed Sep 30 04:12:54 CEST 2009
- Previous message: [Python-Dev] PEP 3144 review.
- Next message: [Python-Dev] PEP 3144 review.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 30 Sep 2009 at 11:07, Nick Coghlan wrote: > At the risk of bikeshedding a bit, I'm still somewhat uncomfortable with > the "net.network" and "net.ip" attribute names. RDMs example application > elicited the reason for that discomfort pretty well: the current naming > seems like an invitation to write code using 'net.ip' that should have > used 'net.network' instead. Such code will then work correctly most of > the time (i.e. when only given normalised IPNetwork objects) but will > fail when given a denormalised one. > > I believe that discomfort could be eliminated best by changing the name > of the ".ip" attribute to ".host_ip" to make it clear that it is > referring to the IP address of the host that was used to derive the > network definition rather than referring to the network ID itself. > Shortening ".network" to ".net_ip" would also help (this latter change > would also eliminate the mental disconnect caused by an attribute called > .network returning an IPAddress instance). +1 --David (RDM)
- Previous message: [Python-Dev] PEP 3144 review.
- Next message: [Python-Dev] PEP 3144 review.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list