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 choices should be a sequence · Issue #92446 · python/cpython

Argparse choices should be a sequence #92446

New issue
Copy link
New issue
Copy link
Closed
Closed
Argparse choices should be a sequence#92446
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixesdocsDocumentation in the Doc dirDocumentation in the Doc direasy

Description

@rhettinger
rhettinger
opened on May 8, 2022
Issue body actions

Documentation

Instead of saying "any container" is supported, refer only to "sequences".

Technically, a Container is only required to support __contains__ which is insufficent for argparse. Also, a sets do get accepted are a bad choice because the order shown in help and usage is non-deterministic. So, Sequence is the only reasonable choice because we need sizing and ordered iteration.

Linked PRs

  • gh-92446: Fix Argparse and LZMACompressor Docs #94627
  • [3.11] gh-92446: Improve argparse choices docs (GH-94627) #100528
  • [3.10] gh-92446: Improve argparse choices docs (GH-94627)  #100529

Activity

  1. rhettinger
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    3.11only security fixesonly security fixes
    easy
    3.10 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    3.12only security fixesonly security fixes
    on May 8, 2022
  2. rhettinger
    added a commit that references this issue on May 13, 2022

    gh-92446: Argparse choices should be a sequence (#92450)

    b39f841
  3. slateny
    closed this as completedon May 15, 2022
  4. slateny commented on May 15, 2022

    @slateny
    slateny
    on May 15, 2022
    Contributor
    More actions

    Actually, the linked pr changes refer to lzma instead of argparse, was this intended?

    Reacted by Shantanu
  5. slateny
    reopened this on May 15, 2022
  6. AA-Turner commented on May 16, 2022

    @AA-Turner
    AA-Turner
    on May 16, 2022
    Member
    More actions

    On a quick review I'd also say that the change to lzma.rst should be reverted, as the option is in the context of .xz or .lzma container formats.

    A

    Reacted by Ulises Ojeda
  7. erlend-aasland
    added this to Argparse issueson May 19, 2022
  8. erlend-aasland
    moved this to Doc issues in Argparse issueson May 19, 2022
  9. DanielNoord commented on Jul 7, 2022

    @DanielNoord
    DanielNoord
    on Jul 7, 2022
    Contributor
    More actions

    Both #94561 and #94627 fix this.
    The latter seems better though as it is a little more thorough.

    I don't think any more PRs are needed, let's focus on merging either of these.

    Reacted by Alex Waygood
  10. erlend-aasland
    removed
    3.9 (EOL)end of lifeend of life
    on Jul 23, 2022
  11. hauntsaninja
    added 5 commits that reference this issue on Dec 26, 2022

    gh-92446: Improve argparse choices docs; revert bad change to lzma do…

    ad3c99e

    [3.11] pythongh-92446: Improve argparse choices docs; revert bad chan…

    312c8f6

    [3.10] pythongh-92446: Improve argparse choices docs; revert bad chan…

    1bf98a9

    [3.11] gh-92446: Improve argparse choices docs (GH-94627) (#100528)

    2cb4b13

    [3.10] gh-92446: Improve argparse choices docs (GH-94627) (#100529)

    a167365
  12. hauntsaninja
    closed this as completedon Dec 26, 2022
  13. Reabstraction
    added a commit that references this issue on Dec 26, 2022

    Merge pull request #1 from python/main

    94aa4a6
  14. iritkatriel
    added a commit that references this issue on Dec 28, 2022

    Merged main into regmachine branch (#50)

    fdc73cb
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

    3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixesdocsDocumentation in the Doc dirDocumentation in the Doc direasy

    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 01402503 — 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.