KEMBAR78
Fix exceptions in argparse · Issue #126068 · python/cpython · GitHub
Skip to content

Fix exceptions in argparse #126068

@serhiy-storchaka

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

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    Status

    Doc issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions