You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make it possible to mark Argument Clinic args as unused #104389
For base classes, it is not unusual to create stubs for interface methods, and let those stubs simply raise an exception. It would be nice to be able to mark the arguments with Py_UNUSED in those cases.
Implementing this is straight-forward in clinic.py. CConverter get's a new keyword argument unused which defaults to False, and we can write code like this:
Activity
erlend-aasland commentedon May 11, 2023
cc. @vstinner
pythongh-104389: Argument Clinic now wraps unused args with Py_UNUSED
gh-104389: Add 'unused' keyword to Argument Clinic C converters (#104390
erlend-aasland commentedon May 12, 2023
Implemented with:
Merge branch 'main' into supermon
python/cpython#104389: Add 'unused' keyword to Argument Clinic C conv…
python/cpython#104389: Add 'unused' keyword to Argument Clinic C conv…
python/cpython#104389: Add 'unused' keyword to Argument Clinic C conv…