New submission from Jakub Warmuz <jakub.warmuz+bugs.python....@gmail.com>:

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 "error: ambiguous option: --foo could match --foo1, --foo2".

It seems like argument abbreviation mechanism described at 
http://docs.python.org/library/argparse.html#argument-abbreviations is not 
working properly when in use with subparsers...

----------
components: Library (Lib)
files: argparse_subparsers_ambiguous_bug.py
messages: 156272
nosy: bethard, jakub
priority: normal
severity: normal
status: open
title: argparse: subparsers, argument abbreviations and ambiguous option
type: behavior
versions: Python 2.7, Python 3.2
Added file: 
http://bugs.python.org/file24928/argparse_subparsers_ambiguous_bug.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14365>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to