Author david.caro
Recipients david.caro
Date 2011-01-22.12:49:07
SpamBayes Score 3.35188e-07
Marked as misclassified No
Message-id <1295700552.8.0.933174530734.issue10981@psf.upfronthosting.co.za>
In-reply-to
Content
When parsing option like --optionname, --option will match it too

example:

>>> import argparse
>>>  parser = argparse.ArgumentParser()
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--superstring')
_StoreAction(option_strings=['--superstring'], dest='superstring', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None)
>>> parser.parse_args(['--super','value'])
Namespace(superstring='value')

I'm using argparse 1.1 with python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39), on ubuntu 10.10 32bit
History
Date User Action Args
2011-01-22 12:49:12david.carosetrecipients: + david.caro
2011-01-22 12:49:12david.carosetmessageid: <1295700552.8.0.933174530734.issue10981@psf.upfronthosting.co.za>
2011-01-22 12:49:08david.carolinkissue10981 messages
2011-01-22 12:49:07david.carocreate