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 jaraco
Recipients eric.araujo, idank, jaraco, rr2do2
Date 2012-10-06.18:29:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349548168.81.0.590993217708.issue14174@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-10-06 18:29:28jaracosetrecipients: + jaraco, eric.araujo, idank, rr2do2
2012-10-06 18:29:28jaracosetmessageid: <1349548168.81.0.590993217708.issue14174@psf.upfronthosting.co.za>
2012-10-06 18:29:28jaracolinkissue14174 messages
2012-10-06 18:29:28jaracocreate