New submission from David Caro <david.caro.este...@gmail.com>: 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 ---------- messages: 126833 nosy: David.Caro priority: normal severity: normal status: open title: options starting with -- match substrings _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10981> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com