[issue14365] argparse: subparsers, argument abbreviations and ambiguous option

2012-03-19 Thread Jakub Warmuz
Jakub Warmuz added the comment: Attached quick&dirty fix I'm currently using in my project. Maybe this will help to create a valid patch. Instead of changing _parse_optional, I've overridden _get_option_tuples to scan subparsers for matching optional arguments if option is am

[issue14365] argparse: subparsers, argument abbreviations and ambiguous option

2012-03-18 Thread Jakub Warmuz
Jakub Warmuz added the comment: I don't understand how both bugs are related. Surely, patch provided for #12713 does not fix the issue I described. -- ___ Python tracker <http://bugs.python.org/is

[issue14365] argparse: subparsers, argument abbreviations and ambiguous option

2012-03-18 Thread Jakub Warmuz
New submission from Jakub Warmuz : Assuming following: 1. optional argument, say "--foo", in a subparser; 2. at least two different optional arguments in the main parser prefixed with "--foo", say "--foo1" and "--foo2"; parsing fails with "erro