[docs] [issue13237] subprocess docs should emphasise convenience functions

Ezio Melotti report at bugs.python.org
Thu Oct 27 05:51:09 CEST 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

I think Éric is referring to the foo(bar, *, baz=None) syntax.  In 2.7 you can drop the '*' and still leave only the keyword arguments that you think are more useful.
I also see that you converted a few examples to use shell=True, but afaiu that should be avoided (even if the input is trusted, it can be a bad example and lead to escaping issues).
For the 'exit 1' example you could add a note saying that the example is run with shell=True because 'exit' requires a shell, or just keep the more verbose Python version.
My concern is that many people just go trough the examples and copy/paste what they see without reading the text around unless it's necessary to make the command work, so, if many examples use shell=True, they might end up picking one of those.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13237>
_______________________________________


More information about the docs mailing list