[Python-ideas] Allow filter(items)
Shane Green
shane at umbrellacode.com
Wed Aug 7 05:09:20 CEST 2013
Okay, but those are kind of implementation detail reasons, not language consistency, right?
On Aug 6, 2013, at 7:52 PM, Joshua Landau <joshua at landau.ws> wrote:
> On 7 August 2013 03:46, Shane Green <shane at umbrellacode.com> wrote:
>> It seems kind of like there should be a filtered operation like there is a
>> sorted one.
>
> filtered would be identical to filter as-is. sorted is a counterpart
> to a method, not another function.
>
>> (and why not have a list.filter(predicate=None) to perform in place
>> filtering for that matter?)
>
> sorted actually just converts to a list and then runs the sort method
> AFAICT. sort is defined in-place because it's efficient that way. None
> of this applies to filter.
> _______________________________________________
> 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/20130806/94c876b5/attachment.html>
More information about the Python-ideas
mailing list