[Python-ideas] Adding an optional function argument to all() and any() builtins

Brett Cannon brett at python.org
Mon Nov 22 20:42:21 CET 2010


On Sun, Nov 21, 2010 at 17:56, Carl M. Johnson
<cmjohnson.mailinglist at gmail.com> wrote:
> On Sun, Nov 21, 2010 at 3:34 PM, Andy Buckley wrote:
>>
>> To reiterate, though, for those who like me have a blank day and fail to
>> realise that generator expressions are a neat and powerful idiom in this
>> case, I think it would be nice to mention this in their documentation.
>
> If you read the original blog post where GvR mentions any/all, he does so
> specifically in the context of making generator expressions more useful. :-)
> That said, probably very few Python users will ever read that post, so it
> should be better documented.

But the blind spot of not thinking in terms of genexps is for "old"
Python developers, not new ones who started off with them and probably
don't use listcomps that often (I know I don't anymore). Documenting
this specific suggestion leads down a rabbit hole of adding coding
suggestions all over Python for how we feel something *should* be used
when it isn't really our place to do so.

But if someone wants to submit a patch to fix the docs another core
developer might be willing to make the change other than me (I'm -0 on
the change).



More information about the Python-ideas mailing list