Skip to content

Commit

Permalink
python/cpython#104389: Add 'unused' keyword to Argument Clinic C conv…
Browse files Browse the repository at this point in the history
…erters (python/cpython#104390)

Use the unused keyword param in the converter to explicitly
mark an argument as unused:

    /*[clinic input]
    SomeBaseClass.stubmethod
        flag: bool(unused=True)
    [clinic start generated code]*/
  • Loading branch information
erlend-aasland committed Sep 8, 2023
1 parent 3edac31 commit 816a8be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Doc/howto/clinic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,9 @@ All Argument Clinic converters accept the following arguments:
because :pep:`8` mandates that the Python library may not use
annotations.

``unused``
Wrap the argument with :c:macro:`Py_UNUSED` in the impl function signature.

In addition, some converters accept additional arguments. Here is a list
of these arguments, along with their meanings:

Expand Down

0 comments on commit 816a8be

Please sign in to comment.