-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Feature
Running the two code snippets below in CPython and in RustPython give different results
Example 1
def f(a, /, b=0): pass
f.__qualname__ = "g"
f(a=1, b=0)In CPython:
TypeError: g() got some positional-only arguments passed as keyword arguments: 'a'
In RustPython:
TypeError: f() got some positional-only arguments passed as keyword arguments: 'a'
Example 2
class A:
def f(self, a, /, b=0): pass
A().f(a=1, b=0)In CPython:
TypeError: A.f() got some positional-only arguments passed as keyword arguments: 'a'
In RustPython:
TypeError: f() got some positional-only arguments passed as keyword arguments: 'a'
Python Documentation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels