Skip to content

Argparse incorrectly handles '--' as argument to option #58572

Description

@mmaker
mannequin
BPO14364
Nosy@rhettinger, @merwok, @bitdancer, @mmaker, @vadmium, @shihai1991, @horazont
PRs
  • gh-58572: Fix behavior when '--' as argument to option in argparse #15714
  • Files
  • foo.py
  • issue14364.test.patch
  • dbldash.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=Noneclosed_at=Nonecreated_at=<Date2012-03-18.14:29:12.929>labels= ['3.7', '3.8', 'type-bug', 'library', '3.9']
    title="Argparse incorrectly handles '--' as argument to option"updated_at=<Date2021-03-23.01:07:11.301>user='https://github.com/mmaker'

    bugs.python.org fields:

    activity=<Date2021-03-23.01:07:11.301>actor='rhettinger'assignee='none'closed=Falseclosed_date=Nonecloser=Nonecomponents= ['Library (Lib)']
    creation=<Date2012-03-18.14:29:12.929>creator='maker'dependencies= []
    files= ['24926', '29938', '45944']
    hgrepos= []
    issue_num=14364keywords= ['patch', 'needs review']
    message_count=17.0messages= ['156254', '156256', '156275', '156293', '187283', '187344', '187346', '187349', '262545', '262558', '283501', '351230', '353865', '354001', '354049', '354066', '389361']
    nosy_count=9.0nosy_names= ['rhettinger', 'bethard', 'eric.araujo', 'r.david.murray', 'maker', 'martin.panter', 'paul.j3', 'shihai1991', 'jssfr']
    pr_nums= ['15714']
    priority='high'resolution=Nonestage='patch review'status='open'superseder=Nonetype='behavior'url='https://bugs.python.org/issue14364'versions= ['Python 2.7', 'Python 3.7', 'Python 3.8', 'Python 3.9']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      Status
      Doc issues

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions