You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error message in getopt.do_longs can be improved based on the existing comment #126946
getopt.do_longs raises an error when there are 2 or more possibilities for a given long option. Currently the error only shows the user input, but not the possibilities. For example, option --he not a unique prefix.
This behavior can be improved by including the possible matches in the error message, as suggested by the existing comment: “XXX since possibilities contains all valid continuations, might be nice to work them into the error msg”. For example, option --he not a unique prefix; possible options: help, hello, hearts.
Activity
bombs-kim commentedon Nov 18, 2024
There is already a PR related with this issue. #126871
gh-126946: Improve error message in getopt.do_longs based on existing…
serhiy-storchaka commentedon Nov 26, 2024
Thank you for your contribution @bombs-kim.
pythongh-126946: Improve error message in getopt.do_longs based on ex…