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.

Author mapleoin
Recipients bethard, mapleoin
Date 2012-07-07.08:45:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
To reproduce:

>>> import argparse
[74536 refs]
>>> parser = argparse.ArgumentParser()
[74809 refs]
>>> parser.add_argument("foo")
>>> parser.add_argument("foo")
>>> parser.parse_args(["bar"])

usage: ipython [-h] foo foo
ipython: error: too few arguments
An exception has occurred, use %tb to see the full traceback.

SystemExit: 2

>>> parser.parse_args(["bar", "baz"])
>>> Namespace(foo='baz')

So it actually makes you provide two arguments, but it loses/ignores the first one and there's no way to get it back.
Date User Action Args
2012-07-07 08:45:41mapleoinsetrecipients: + mapleoin, bethard
2012-07-07 08:45:41mapleoinsetmessageid: <>
2012-07-07 08:45:40mapleoinlinkissue15271 messages
2012-07-07 08:45:40mapleoincreate