Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 32e1771

Browse files
committed
#10728: the default for printing help is sys.stdout, not stderr.
1 parent 77570e2 commit 32e1771

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/argparse.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,14 +1658,14 @@ are available:
16581658
.. method:: ArgumentParser.print_usage(file=None)
16591659

16601660
Print a brief description of how the :class:`ArgumentParser` should be
1661-
invoked on the command line. If *file* is ``None``, :data:`sys.stderr` is
1661+
invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is
16621662
assumed.
16631663

16641664
.. method:: ArgumentParser.print_help(file=None)
16651665

16661666
Print a help message, including the program usage and information about the
16671667
arguments registered with the :class:`ArgumentParser`. If *file* is
1668-
``None``, :data:`sys.stderr` is assumed.
1668+
``None``, :data:`sys.stdout` is assumed.
16691669

16701670
There are also variants of these methods that simply return a string instead of
16711671
printing it:

0 commit comments

Comments
 (0)