Fix sys.stderr typo.
This commit is contained in:
parent
13b537ae32
commit
eff8913eed
10
pep-0389.txt
10
pep-0389.txt
|
@ -244,15 +244,15 @@ but are out of the scope of this PEP, and have been redirected to
|
|||
the argparse issue tracker.
|
||||
|
||||
|
||||
Discussion: sys.err and sys.exit
|
||||
================================
|
||||
Discussion: sys.stderr and sys.exit
|
||||
===================================
|
||||
There were some concerns that argparse by default always writes to
|
||||
``sys.err`` and always calls ``sys.exit`` when invalid arguments are
|
||||
provided. This is the desired behavior for the vast majority of
|
||||
``sys.stderr`` and always calls ``sys.exit`` when invalid arguments
|
||||
are provided. This is the desired behavior for the vast majority of
|
||||
argparse use cases which revolve around simple command line
|
||||
interfaces. However, in some cases, it may be desirable to keep
|
||||
argparse from exiting, or to have it write its messages to something
|
||||
other than ``sys.err``. These use cases can be supported by
|
||||
other than ``sys.stderr``. These use cases can be supported by
|
||||
subclassing ``ArgumentParser`` and overriding the ``exit`` or
|
||||
``_print_message`` methods. The latter is an undocumented
|
||||
implementation detail, but could be officially exposed if this turns
|
||||
|
|
Loading…
Reference in New Issue