[New-bugs-announce] [issue10728] argparse.ArgumentParser.print_help uses sys.stdout

Silvio Ricardo Cordeiro report at bugs.python.org
Sat Dec 18 04:10:56 CET 2010


New submission from Silvio Ricardo Cordeiro <silvioricardoc at 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 _print_message actually does it right, when called with file=None.

----------
components: Library (Lib)
messages: 124271
nosy: silvioricardoc
priority: normal
severity: normal
status: open
title: argparse.ArgumentParser.print_help uses sys.stdout
type: behavior
versions: Python 2.6

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


More information about the New-bugs-announce mailing list