diff options
author | Erlend E. Aasland <erlend.aasland@protonmail.com> | 2023-05-12 08:34:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 08:34:00 (GMT) |
commit | b2c1b4da1935639cb89fbbad0ce170a1182537bd (patch) | |
tree | 5b68de40c8c0aa71db3157e0653450206d6beb13 /Doc/howto | |
parent | 15795b57d92ee6315b5c8263290944b16834b5f2 (diff) | |
download | cpython-b2c1b4da1935639cb89fbbad0ce170a1182537bd.zip cpython-b2c1b4da1935639cb89fbbad0ce170a1182537bd.tar.gz cpython-b2c1b4da1935639cb89fbbad0ce170a1182537bd.tar.bz2 |
gh-104389: Add 'unused' keyword to Argument Clinic C converters (#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]*/
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/clinic.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/howto/clinic.rst b/Doc/howto/clinic.rst index 6ebc2d9..4620b46 100644 --- a/Doc/howto/clinic.rst +++ b/Doc/howto/clinic.rst @@ -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: |