[Python-Dev] PEP 3144 review.
Steven D'Aprano
steve at pearwood.info
Sun Sep 27 03:08:32 CEST 2009
More information about the Python-Dev mailing list
Sun Sep 27 03:08:32 CEST 2009
- Previous message: [Python-Dev] PEP 3144 review.
- Next message: [Python-Dev] PEP 3144 review.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 27 Sep 2009 03:44:45 am Martin v. Löwis wrote: > > - Masks are also 32- (128-) bit integers, which happen to have the > > property that their leftmost N bits are all zero and the rest > > are all one. > > As a side note, I would be in favor of dropping the concept of a mask > from the library, and only support a prefix length. -1 > 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 would be terribly annoyed if I had to count the bits myself before passing it to IPv4Address. -- Steven D'Aprano
- 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