New submission from Xiang Zhong <zhongxiang...@gmail.com>:

Additional argument like "allow_abbrev_short" should be added to avoid those 
potential bugs due to abbreviations on short options cannot be handled by 
"allow_abbrev".

To reproduce and be well explanation, please check on my attached testing file.

The following is the excerpt:

1) contents in link:
   https://docs.python.org/3/library/argparse.html#prefix-matching
   should be updated to long options (two dashes)

2) bugs may happen due to `allow_abbrev' cannot handle short options
   when recycling top-level arguments by using `add_subparsers'

----------
components: Library (Lib)
files: myargparse.py
messages: 397268
nosy: zhongxiang117
priority: normal
severity: normal
status: open
title: argparse: potential bugs on add_subparser due to allow_abbrev cannot 
deal with short options
type: behavior
versions: Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50143/myargparse.py

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

Reply via email to