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 Ingo.Fischer
Recipients Ingo.Fischer
Date 2012-07-11.11:05:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342004730.08.0.363281774737.issue15327@psf.upfronthosting.co.za>
In-reply-to
Content
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 'myscript --verbose command' or 'myscript command --verbose'. I always get the same Namespace object returned from parse_args.

IMHO the Namespace object should also provide informations about the source parser, to make main parser args and subparser args distinguishable. Also if I call 'myscript --verbose command --verbose', I should get both args in the resulting Namespace object.
History
Date User Action Args
2012-07-11 11:05:30Ingo.Fischersetrecipients: + Ingo.Fischer
2012-07-11 11:05:30Ingo.Fischersetmessageid: <1342004730.08.0.363281774737.issue15327@psf.upfronthosting.co.za>
2012-07-11 11:05:29Ingo.Fischerlinkissue15327 messages
2012-07-11 11:05:29Ingo.Fischercreate