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 — Parameter's error messages say `argument` instead of `parameter` · Issue #133379 · python/cpython

Parameter's error messages say argument instead of parameter #133379

New issue
Copy link
New issue
Copy link
Closed
Closed
Parameter's error messages say argument instead of parameter#133379
Copy link
Labels
3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@hyperkai
hyperkai
opened on May 4, 2025
Issue body actions

Bug report

Bug description:

Setting the same name parameters gets the error message saying duplicate argument as shown below:

def func(param, param):
    pass

SyntaxError: duplicate argument 'param' in function definition

Setting * after all the parameters gets the error message saying at least one argument as shown below:

def func(param1, param2, *):
    pass

SyntaxError: named arguments must follow bare *

So, argument should be replaced with parameter as shown below:

SyntaxError: duplicate parameter 'param' in function definition

SyntaxError: named parameters must follow bare *

*You can also see this issue.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

  • gh-133379: Correct usage of arguments in error messages #133382

Activity

  1. hyperkai
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 4, 2025
  2. picnixz
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    and removed
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on May 4, 2025
  3. picnixz commented on May 4, 2025

    @picnixz
    picnixz
    on May 4, 2025
    Member
    More actions

    Formally speaking, here we indeed need to use "parameter" and not "argument". However, we only change error messages in the latest version to reduce breakage possibilities (thus, I don't think we'll backport this)

    Reacted by Peter Bierma
  4. picnixz
    added
    topic-parser
    on May 4, 2025
  5. picnixz
    marked * parameter's error messages say argument instead of parameter #133436 as a duplicate of this issue on May 9, 2025
  6. serhiy-storchaka
    added a commit that references this issue on May 10, 2025

    gh-133379: Fix misuse of the term "arguments" in error messages (GH-1…

    dbca27c
  7. serhiy-storchaka
    added
    3.15bugs and security fixesbugs and security fixes
    on May 10, 2025
  8. serhiy-storchaka commented on May 10, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on May 10, 2025
    Member
    More actions

    Thank you for your report, @hyperkai. It's amazing how long we ignored this mistake.

    Thank you for your PR, @StanFromIreland.

    Reacted by Stan Ulbrych
  9. serhiy-storchaka
    closed this as completedon May 10, 2025
  10. hyperkai commented on May 11, 2025

    @hyperkai
    hyperkai
    on May 11, 2025
    ContributorAuthor
    More actions

    There are other error messages using argument instead of parameter as shown below:

    def func(*args1, *args2): pass
    # SyntaxError: * argument may appear only once
    
    def func(**kwargs, *args): pass
    # SyntaxError: arguments cannot follow var-keyword argument
    
    def func(*args=["John"]): pass
    # SyntaxError: var-positional argument cannot have default value
    
    def func(**kwargs={"name":"John"}): pass
    # SyntaxError: var-keyword argument cannot have default value
  11. StanFromIreland commented on May 11, 2025

    @StanFromIreland
    StanFromIreland
    on May 11, 2025
    Member
    More actions

    You need to pull the latest commits and build again.

  12. Pranjal095
    added a commit that references this issue on Jul 12, 2025

    pythongh-133379: Fix misuse of the term "arguments" in error messages (…

    332d44c
  13. taegyunkim
    added a commit that references this issue on Aug 4, 2025

    pythongh-133379: Fix misuse of the term "arguments" in error messages (…

    3e82f21
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.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      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.