Skip to content

Fix exceptions in argparse #126068

Description

@serhiy-storchaka

Bug report

There are several issues with exceptions in the argparse module:

  • Only error messages for ArgumentError and ArgumentTypeError should be translated. These exceptions are the part of the user interface of the program that uses argparse. Other exceptions indicate logical errors in the program and are purposed for the programmer.
  • ArgumentError should only be used for command line errors, not for logical errors in the program.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions