Message172232
I also ran into this problem. I put together this script to reproduce the issue:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('app')
parser.add_argument('--config')
parser.add_argument('app_args', nargs=argparse.REMAINDER)
args = parser.parse_args(['app', '--config', 'bar'])
print vars(args)
# actual: {'app': 'app', 'app_args': ['--config', 'bar'], 'config': None}
# expected: {'app': 'app', 'app_args': [], 'config': 'bar'}
I'll try using parse_known_args instead. |
|
Date |
User |
Action |
Args |
2012-10-06 18:29:28 | jaraco | set | recipients:
+ jaraco, eric.araujo, idank, rr2do2 |
2012-10-06 18:29:28 | jaraco | set | messageid: <1349548168.81.0.590993217708.issue14174@psf.upfronthosting.co.za> |
2012-10-06 18:29:28 | jaraco | link | issue14174 messages |
2012-10-06 18:29:28 | jaraco | create | |
|