Content-Length: 275506 | pFad | https://github.com/python/cpython/issues/126946

ad Error message in getopt.do_longs can be improved based on the existing comment · Issue #126946 · python/cpython · GitHub
Skip to content

Error message in getopt.do_longs can be improved based on the existing comment #126946

Description

@bombs-kim

Feature or enhancement

Proposal:

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.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/126946

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy