argparse doesn't allow optionals within positionals · Issue #58399 · python/cpython · GitHub
Skip to content

argparse doesn't allow optionals within positionals #58399

Description

@vpython
mannequin
BPO 14191
Nosy @bitdancer, @vadmium, @monkeyman79
PRs
  • bpo-14191 Add parse_intermixed_args. #3319
  • bpo-42973: argparse: mixing optional and positional #24259
  • bpo-42973: argparse: mixing optional and positional #24367
  • Files
  • t12.py: test case demonstrating bug
  • 14191.diff
  • t13.py: Demonstration that optparse accepts scattered positional parameters.
  • t14.py
  • t16.py: Demonstrate solution based on Steven's suggestion
  • t18.py: multiclass wrapper for argparse to allow intermixed parameters
  • t18a.py
  • test_intermixed.py
  • test_intermixed.py
  • intermixed.patch
  • test_intermixed.py
  • intermixed.patch
  • 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 = <Date 2017-09-07.00:27:33.235>
    created_at = <Date 2012-03-04.06:36:30.660>
    labels = ['3.7', 'type-feature', 'library']
    title = "argparse doesn't allow optionals within positionals"
    updated_at = <Date 2021-01-29.13:29:51.106>
    user = 'https://bugs.python.org/vpython'

    bugs.python.org fields:

    activity = <Date 2021-01-29.13:29:51.106>
    actor = 'monkeyman79'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-09-07.00:27:33.235>
    closer = 'r.david.murray'
    components = ['Library (Lib)']
    creation = <Date 2012-03-04.06:36:30.660>
    creator = 'v+python'
    dependencies = []
    files = ['24726', '24745', '24749', '24753', '24764', '24771', '26273', '29982', '30159', '30160', '30204', '30422']
    hgrepos = []
    issue_num = 14191
    keywords = ['patch']
    message_count = 47.0
    messages = ['154880', '155008', '155019', '155039', '155062', '155103', '155157', '155172', '155185', '155188', '155202', '155212', '155272', '155277', '164756', '166175', '166193', '185517', '187051', '187269', '187270', '187329', '187341', '187596', '187618', '187669', '187680', '188608', '188609', '188680', '188869', '188871', '188887', '188899', '190339', '190340', '195312', '195728', '195740', '196067', '196110', '217812', '301275', '301292', '301415', '301549', '301550']
    nosy_count = 10.0
    nosy_names = ['amcnabb', 'bethard', 'v+python', 'r.david.murray', 'docs@python', 'martin.panter', 'paul.j3', 'guilherme-pg', 'dg1727', 'monkeyman79']
    pr_nums = ['3319', '24259', '24367']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue14191'
    versions = ['Python 3.7']

    Activity

    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.7 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions