New submission from Alan Evangelista:

If you have a argument named --<prefix> in a subparser and two arguments named 
--<prefix><any_suffix)> in the main parser and call the Python executable with

python <script.py> --<prefix>

argparse fails with:

error: ambiguous option: --<prefix> could match --<prefix><suffix1>, 
--<prefix><suffix2>

This probably happens due to how the argument abbreviation parsing is 
implemented. Is it possible to support disabling argument abbreviation in 
Python 2.7, as it is done in Python 3?

----------
components: Library (Lib)
messages: 289327
nosy: Alan Evangelista
priority: normal
severity: normal
status: open
title: argparse arguments in main parser hide an argument in subparser
versions: Python 2.7

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

Reply via email to