[Python-ideas] Add `Executor.filter`

Guido van Rossum guido at python.org
Thu May 14 23:03:02 CEST 2015


If there's a working patch and you can get a core developer as a reviewer
I'm fine with that. No PEP needed.)

On Thu, May 14, 2015 at 1:17 PM, Ram Rachum <ram at rachum.com> wrote:

> I'd like to move `Executor.filter` forward, if that's possible. Can we get
> more people on the list to express their opinion about whether
> `Executor.filter` should be added to the stdlib? (See my implementation in
> a previous message on this thread.)
>
> On Thu, May 7, 2015 at 6:56 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
>> On 2 May 2015 at 19:25, Ram Rachum <ram at rachum.com> wrote:
>> > Okay, I implemented it. Might be getting something wrong because I've
>> never
>> > worked with the internals of this module before.
>>
>> I think this is sufficiently tricky to get right that it's worth
>> adding filter() as a parallel to the existing map() API.
>>
>> However, it did raise a separate question for me: is it currently
>> possible to use Executor.map() and the as_completed() module level
>> function together? Unless I'm missing something, it doesn't look like
>> it, as map() hides the futures from the caller, so you only have
>> something to pass to as_completed() if you invoke submit() directly.
>>
>> Cheers,
>> Nick.
>>
>> --
>> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
>>
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150514/88a28262/attachment.html>


More information about the Python-ideas mailing list