Issue 26047: argparse.ArgumentError documentation wrong (original) (raw)

Issue26047

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:25 admin set github: 70235
2016-01-08 09:22:31 SilentGhost set status: open -> closednosy: + SilentGhostmessages: + resolution: not a bugstage: resolved
2016-01-08 09🔞18 Christof Hanke create