Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

argparse: make suggest_on_error a keyword-only parameter #133300

Copy link
Copy link
@hugovk

Description

@hugovk
Issue body actions

Feature or enhancement

Proposal:

argparse.ArgumentParser() has a lot of parameters, suggest_on_error (added in 3.14) was its 15th.

https://docs.python.org/3.14/library/argparse.html#argparse.ArgumentParser

Many argparse CLIs I see already use keywords for most parameters, but I think we should make these new ones keyword-only, especially for new bools, as a long list of (..., True, False, True, ...) is best avoided.

Parameter number 16 color (added in 3.14) is keyword-only. I suggest we make suggest_on_error keyword-only as well.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancementA feature request or enhancement
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.