Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

gh-90795: Fix error message incorrectly including "positional"#139678

Open
StanFromIreland wants to merge 2 commits intopython:mainfrom
StanFromIreland:pos-not-pos
Open

gh-90795: Fix error message incorrectly including "positional"#139678
StanFromIreland wants to merge 2 commits intopython:mainfrom
StanFromIreland:pos-not-pos

Conversation

@StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Oct 6, 2025

This does not cover the more complicated case of a positional only and keyword-or-positional argument, that remains the same:

>>> def foo(a, /, b): pass
... 
>>> foo()
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    foo()
    ~~~^^
TypeError: foo() missing 2 required positional arguments: 'a' and 'b'

@StanFromIreland
Copy link
Member Author

Friendly ping @markshannon & @ericvsmith :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant