paul j3 added the comment:
`parse_args` just calls `parse_known_args`, and then raises an error if `rest`
is not empty. So it is `parse_known_args` that is doing the abbreviation
matching.
Abbreviation matching is done relatively early, when `_parse_known_args` first
loops through the strings, trying to decide which are arguments ('A') and which
are options ('O'). This matching is done in `_parse_optional`. It's not
something it does at the end on the 'leftovers'.
http://bugs.python.org/issue14910, a disable abbreviation option, might be a
better solution. Your example is an argument in favor of implementing that
feature.
Unless a reader has your example in mind, the proposed documentation warning
might be more confusing than helpful.
----------
nosy: +paul.j3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19814>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com