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 waltermundt
Recipients waltermundt
Date 2012-06-20.04:15:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340165747.87.0.563099760163.issue15112@psf.upfronthosting.co.za>
In-reply-to
Content
Test case:

    from argparse import *

    parser = ArgumentParser()
    parser.add_argument('-x', action='store_true')
    parser.add_argument('y')
    parser.add_argument('z', nargs='*')

    print parser.parse_args('yy -x zz'.split(' '))

The result of this is that the "z" option is unfilled, and the "zz" argument is unrecognized, resulting in an error.  Changing the 'nargs' to '+' works in this case, but results in errors if the 'zz' is left off.
History
Date User Action Args
2012-06-20 04:15:48waltermundtsetrecipients: + waltermundt
2012-06-20 04:15:47waltermundtsetmessageid: <1340165747.87.0.563099760163.issue15112@psf.upfronthosting.co.za>
2012-06-20 04:15:47waltermundtlinkissue15112 messages
2012-06-20 04:15:46waltermundtcreate