[issue22864] Add filter to multiprocessing.Pool

2014-11-15 Thread Travis Thieman

Travis Thieman added the comment:

Why is it insufficient to run a synchronous 'filter' over the list returned by 
'Pool.map'? These functional constructs are inherently composable, and we 
should favor composing simple implementations of each rather than implementing 
special cases of them throughout the stdlib.

I think there's a clear reason for 'map' to be parallelizable because the 
function you're applying over the iterable could be quite expensive. 'filter' 
would only benefit from this if the comparison you're running is expensive, 
which seems like an unlikely and ill-advised use case. You can also rewrite 
your expensive 'filter' as a 'map' if you really need to.

--
nosy: +travis.thieman

___
Python tracker 
<http://bugs.python.org/issue22864>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-15 Thread Travis Thieman

Travis Thieman added the comment:

The attached patch includes the first element in args in _execute_child to the 
OSError exception subclass. This correctly populates the 'filename' field on 
the resulting exception. A test is also included that fails without the patch.

--
keywords: +patch
nosy: +travis.thieman
Added file: 
http://bugs.python.org/file37202/22536-subprocess-exception-filename.patch

___
Python tracker 
<http://bugs.python.org/issue22536>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-29 Thread Travis Thieman

Travis Thieman added the comment:

Thank you all for the helpful comments. A revised attempt is attached as 
-2.patch, with improved behavior around using cwd if the child is never called 
and orig_executable if it is. I opted not to fix the issue with the redundancy 
in the error message as I agree that should be handled as a separate issue.

--
Added file: 
http://bugs.python.org/file37322/22536-subprocess-exception-filename-2.patch

___
Python tracker 
<http://bugs.python.org/issue22536>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com