[Python-Dev] PEP 3144 review.

Nick Coghlan ncoghlan at gmail.com
Mon Sep 28 13:49:34 CEST 2009


Greg Ewing wrote:
> Nick Coghlan wrote:
> 
>> The use case for "given a netmask and an arbitrary host on that network,
>> give me the appropriate IPNetwork object" has been well established by
>> this discussion (although still isn't particularly well described even
>> in the latest PEP update). This is what "strict=False" covers,
> 
> I think I'd rather have a separate constructor function
> or method for this, rather than a somewhat cryptically
> named boolean parameter.

Yes, I would prefer a separate method as well. It doesn't bother as much
as the broken definition of equality though.

In fact, if the definition of IPNetwork equality was fixed then leaving
strict mode out entirely would probably be OK.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list