[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2018-05-26 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2012-07-22 Thread Steven Bethard
Steven Bethard added the comment: If you'd like to help improve the documentation so that the workaround for your problem is more obvious, please contribute to Issue 15428. -- ___ Python tracker _

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2012-07-22 Thread Steven Bethard
Steven Bethard added the comment: I don't think there's any easy way for argparse to automatically do what you want. However, there's a simple workaround - just use the dest= argument and specify two different destinations: >>> parser = argparse.ArgumentParser() >>> parser.add_argument('--ver

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2012-07-14 Thread samwyse
samwyse added the comment: One change and one minor problem with my suggestion. First, you don't need the second alias, since it's a prefix of the argument name. Also, HelpFormatter._format_actions_usage ends with a bit of code labeled "clean up separators for mutually exclusive groups"; it

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2012-07-14 Thread samwyse
samwyse added the comment: The Namespace object contains a combined list of all of the arguments, from both the main parser and the subparser. I don't see any way to resolve identically name augments without breaking a lot of code that relies on the current behavior. I would instead propose

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2012-07-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> test needed type: enhancement -> behavior versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 ___ Python tracker ___

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2012-07-13 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +bethard, tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2012-07-11 Thread Ingo Fischer
New submission from Ingo Fischer : I have an argument called '--verbose' in the main parser. Then I add a subparser called 'command', to which I add an argument with the same name '--verbose' (See attached script). When I process these args, I cannot decide afterwards if the user called 'mysc