FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

`*` parameter's error messages say `argument` instead of `parameter` · Issue #133436 · python/cpython · GitHub

Repository navigation

* parameter's error messages say argument instead of parameter #133436

Closed as duplicate

Description

Bug report

Bug description:

Setting two * to a function gets the error message saying * argument as shown below:

def func(*, *, param1, param2):
    pass

SyntaxError: * argument may appear only once

Setting * after all the parameters gets the error message saying named arguments 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

Activity

  1. picnixz commented on May 5, 2025

    Member

    I think it's better to reuse the same issue as before where we could fix usages instead of having multiple issues for the same error.

    For *, we should say "* marker" (or separator, idk) instead (it's not a parameter nor an argument IMO)

  2. added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    pendingThe issue will be closed if no feedback is provided
    on May 5, 2025
  3. StanFromIreland commented on May 5, 2025

    Member

    I can open a separate pr for this.

  4. picnixz commented on May 5, 2025

    Member

    Yes, please

  5. picnixz commented on May 9, 2025

    Member

    Let's do everything in the other PR/issue.

  6. removed
    pendingThe issue will be closed if no feedback is provided
    on Aug 15, 2025
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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL