[Python-Dev] PEP 3144 review.
drkjam at gmail.com
Sun Sep 27 11:06:02 CEST 2009
On 27 Sep 2009, at 07:56, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>>> As a side note, I would be in favor of dropping the concept of a
>>> from the library, and only support a prefix length.
>>> IPv6 doesn't support masks at all, and even for IPv4, I think there
>>> are conventions (if not RFCs) against using them in a way that does
>>> not correspond to a prefix length.
>> Then the module should only support netmasks of the form
>> (say) '255.255.255.224' (equivalent to "/27"), and reject those
>> like "255.3.255.255". It currently accepts them.
>> Many applications still display netmasks in dot-quad form, and I
>> be terribly annoyed if I had to count the bits myself before
>> passing it
>> to IPv4Address.
> I wouldn't ask for that: it should certainly be possible to supply
> masks. However, I would want to reject masks that don't correspond to
> a prefix, and have only the prefix length in the internal
+1 on rejection of netmasks without direct CIDR prefix equivalents.
AFAIK Cisco routers accept them but I don't see how they would be
useful in practice (unless someone can demonstrate their need for this).
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/drkjam%40gmail.com
More information about the Python-Dev