[Python-ideas] Allow filter(items)
Shane Green
shane at umbrellacode.com
Wed Aug 7 16:21:49 CEST 2013
If I read a snippet from the earlier emails correctly, it’s interesting to note that, if not for a trick in the C code that turned bool back into None, the predicate bool would in fact be a redundant transformation.
On Aug 7, 2013, at 5:14 AM, Stephen J. Turnbull <stephen at xemacs.org> wrote:
> Serhiy Storchaka writes:
>
>> The default predicate is not "bool". The default is identity function
>> (lambda x: x).
>
> IIUC correctly, the intent is "bool", it just happens that it's more
> efficient to spell it "lambda x: x" when you don't actually need a
> Boolean value.
>
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130807/83bed8a4/attachment.html>
More information about the Python-ideas
mailing list