[Python-Dev] conceptual clarity

Steven D'Aprano steve at pearwood.info
Fri Sep 18 05:45:11 CEST 2009


On Fri, 18 Sep 2009 01:29:21 pm Peter Moody wrote:
> On Thu, Sep 17, 2009 at 6:17 PM, Andrew McNamara
>
> <andrewm at object-craft.com.au> wrote:
> >>off to patch the pep and implement some of the non controversial
> >> changes.
> >
> > It might be a good idea to add some use-cases to the PEP.
>
> There are several use-cases in the PEP already.
>
> The problem is, for every use-case where one can show that the
> existing implementation is confusing, I can come up with a use-case
> showing where the existing implementation makes more sense than
> anything proposed.

Please excuse my skepticism, but I find that hard to believe.

Given the current API, to test if an address is in the same network as 
another address, you write:

addr_a in addr_b

Can you please give a use-case where that makes more sense than the 
suggested alternative:

addr_a in addr_b.network



-- 
Steven D'Aprano


More information about the Python-Dev mailing list