The Wayback Machine - https://web.archive.org/web/20250525213441/https://github.com/python/cpython/issues/71414
Skip to content

argparse fails to parse [] when using choices and nargs='*' #71414

Closed
@evanunderscore

Description

@evanunderscore
BPO 27227
Nosy @macfreek, @berkerpeksag, @evanunderscore, @iritkatriel
Superseder
  • bpo-9625: argparse: Problem with defaults for variable nargs when using choices
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2016-06-05.08:59:16.765>
    labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
    title = "argparse fails to parse [] when using choices and nargs='*'"
    updated_at = <Date 2021-12-11.18:35:18.463>
    user = 'https://github.com/evanunderscore'

    bugs.python.org fields:

    activity = <Date 2021-12-11.18:35:18.463>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2016-06-05.08:59:16.765>
    creator = 'evan_'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 27227
    keywords = []
    message_count = 4.0
    messages = ['267404', '268387', '315783', '408330']
    nosy_count = 5.0
    nosy_names = ['macfreek', 'berker.peksag', 'paul.j3', 'evan_', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'open'
    superseder = '9625'
    type = 'behavior'
    url = 'https://bugs.python.org/issue27227'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10only security fixes3.11only security fixes3.9only security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

      Projects

      Status

      Doc issues

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions