Message164791
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:41 | mapleoin | set | recipients:
+ mapleoin, bethard |
2012-07-07 08:45:41 | mapleoin | set | messageid: <1341650741.0.0.256570615986.issue15271@psf.upfronthosting.co.za> |
2012-07-07 08:45:40 | mapleoin | link | issue15271 messages |
2012-07-07 08:45:40 | mapleoin | create | |
|