Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add explanation about docstring for PyGetSetDef
  • Loading branch information
corona10 committed Dec 16, 2023
commit db2f44c247e11fcfa31546eef5622172e30de62a
2 changes: 2 additions & 0 deletions development-tools/clinic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,8 @@ The generated glue code looks like this:

Getters and setters must be declared as separate functions.
The *value* parameter for a "setter" is added implicitly by Argument Clinic.
The docstring is also supported for :c:type:`PyGetSetDef` functions like other
but it must be declared at ``@getter``.

And then the implementation will work the same as a Python method which is
decorated by :py:class:`property`:
Expand Down