This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author macfreek
Recipients christian.heimes, jcea, leim, macfreek, ncoghlan, pmoody, santoso.wijaya, terry.reedy, vstinner
Date 2013-08-18.08:25:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376814352.54.0.625159275447.issue17400@psf.upfronthosting.co.za>
In-reply-to
Content
I was about to make the same suggestion as the OP.

Most users think of "private IP" addresses as NATed IP addresses. I think the technical term is "forwardable, but not globally unique". Thus, the method of least surprise would be that indeed the is_private() method returns True for 100.64.0.0/10.

As for the RFC, these addresses are indeed the same, that they are both NATted. They are different that for RFC 1918 addresses, it is the end-site (home network, or office network) that does the NATing, while for RFC 6598, it is the ISP that does the NATing.

I think the confusing comes from the term is_private(). Formally, this only applies to RFC 1918 addresses, but it seems that this library does not take a formal but pragmatic approach. Otherwise, they would have added the methods is_forwardable(), is_global() and is_reserved() in line with what is the official specification at http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml. I prefer a pragmatic approach, and the term is_natted() or is_private() because that is what most programmers are interested in. Those few programmers that truly understand the difference between all these IP ranges (e.g. those who write bogon filter software), will simply avoid these methods and just use the rest of the library.

So +1 for this request.
History
Date User Action Args
2013-08-18 08:25:52macfreeksetrecipients: + macfreek, terry.reedy, jcea, ncoghlan, vstinner, christian.heimes, pmoody, santoso.wijaya, leim
2013-08-18 08:25:52macfreeksetmessageid: <1376814352.54.0.625159275447.issue17400@psf.upfronthosting.co.za>
2013-08-18 08:25:52macfreeklinkissue17400 messages
2013-08-18 08:25:52macfreekcreate