This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: argparse.ArgumentError documentation wrong
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Christof Hanke, SilentGhost, docs@python
Priority: normal Keywords:

Created on 2016-01-08 09:18 by Christof Hanke, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg257745 - (view) Author: Christof Hanke (Christof Hanke) Date: 2016-01-08 09:18
On https://docs.python.org/2/library/argparse.html (and on those of the 3.6-Version) it says at the bottom:

"""

ArgumentParser.error(message)

    This method prints a usage message including the message to the standard error and terminates the program with a status code of 2.
"""

In fact, the returned staus code is 1.
msg257746 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-01-08 09:22
Christof, you'd have to demonstrate the issue in more than just words. The returned status code is hard-coded to be 2 in the error method and it does end up being 2 when i run, could you post some output that led you to believe that it is 1?
History
Date User Action Args
2022-04-11 14:58:25adminsetgithub: 70235
2016-01-08 09:22:31SilentGhostsetstatus: open -> closed

nosy: + SilentGhost
messages: + msg257746

resolution: not a bug
stage: resolved
2016-01-08 09:18:18Christof Hankecreate