[New-bugs-announce] [issue26645] argparse prints help messages to stdout instead of stderr by default
report at bugs.python.org
Sat Mar 26 08:05:01 EDT 2016
New submission from Alexey Muranov:
I believe that printing help and usage messages to stdout is a design error.
In stdout i expect to find the output of my program, not help or diagnostic messages. It is strange to see nothing printed on the screen (where stderr usually goes), and then to find help, usage, or *error* messages in the file where stdout was sent. (Yes, argparse prints even error messages to stdout by default).
This issue has been discussed before because the implementation did not agree with the documentation: http://bugs.python.org/issue10728
I believe that the conclusion to adjust the documentation to the implementation was a mistake.
P.S. Compare with the direction of the output of `grep -h` or `git -h`.
components: Library (Lib)
nosy: Alexey Muranov
title: argparse prints help messages to stdout instead of stderr by default
versions: Python 3.5
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce