Jan-Philip Gehrcke added the comment:
The version action currently writes to stderr. The _VersionAction(Action)'s
__call__() method finishes off with
parser.exit(message=formatter.format_help())
and parser.exit() by default writes to stderr.
Here, Steven says Help is definitely intended to
Éric Araujo mer...@netwok.org added the comment:
Alright, I didn’t know you were doing mass merges. I personally prefer to
leave reports open until backported, now I’ll know your habits.
--
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
This apparently lacks a 2.7 backport.
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10728
___
R. David Murray rdmur...@bitdance.com added the comment:
Like Georg, I'll get to that when I do a mass backport of all my doc fixes. My
apologies for missing the beta2 deadline on doing that, but there aren't many
of them.
--
___
Python tracker
Steven Bethard steven.beth...@gmail.com added the comment:
Yep, this is a documentation bug. Help is definitely intended to print to
stdout.
--
versions: -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10728
R. David Murray rdmur...@bitdance.com added the comment:
Fixed in r87372.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10728
New submission from Silvio Ricardo Cordeiro silvioricar...@gmail.com:
The documentation at http://docs.python.org/dev/library/argparse.html
explicitly says that If file is None, sys.stderr is assumed.
However, both print_usage and print_help assume sys.stdout when file=None. The
helper method
R. David Murray rdmur...@bitdance.com added the comment:
I think this is a documentation bug, since IMO help should print on stdout, not
stderr[1]. I would expect print_usage to do likewise, but for the error to
tell print_usage to write to stderr when it calls it...which is exactly what
the
Changes by R. David Murray rdmur...@bitdance.com:
--
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10728
___