GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — argparse: when wrong choice is selected, the error message prints available choices using `repr()` instead of `str()` · Issue #118839 · python/cpython

argparse: when wrong choice is selected, the error message prints available choices using repr() instead of str() #118839

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
argparse: when wrong choice is selected, the error message prints available choices using repr() instead of str()#118839
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@rindeal
rindeal
opened on May 9, 2024
Issue body actions

Bug report

Bug description:

I tried using StrEnum for choices and it printed choose from <Enum.FOO: 'foo'>, ... instead of choose from foo, .....

Fix in #117766

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

  • gh-86357: argparse: use str() consistently and explicitly to print choices #117766

Activity

  1. rindeal
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 9, 2024
  2. rindeal
    added a commit that references this issue on May 9, 2024

    argparse: use str() consistently and explicitly to print choices

    48f6b8c
  3. serhiy-storchaka
    added this to Argparse issueson May 10, 2024
  4. rindeal
    added 5 commits that reference this issue on Sep 25, 2024

    argparse: use str() consistently and explicitly to print choices

    2ed7b67

    argparse: use str() consistently and explicitly to print choices

    eb9e854

    argparse: use str() consistently and explicitly to print choices

    f4a8bf3

    argparse: use str() consistently and explicitly to print choices

    e4ee132

    argparse: use str() consistently and explicitly to print choices

    aea8322
  5. serhiy-storchaka commented on Sep 27, 2024

    @serhiy-storchaka
    serhiy-storchaka
    on Sep 27, 2024
    Member
    More actions

    This is actually a duplicate of #86357.

  6. rindeal commented on Sep 27, 2024

    @rindeal
    rindeal
    on Sep 27, 2024
    ContributorAuthor
    More actions

    This is actually a duplicate of #86357.

    Good find. I've re-linked the PR and I'm closing this in favor of that issue.

  7. rindeal
    closed this as not plannedon Sep 27, 2024
  8. github-project-automation
    moved this to Doc issues in Argparse issueson Sep 27, 2024
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

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • Argparse issues
      Status
      Doc issues
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.