Skip to content

Add explanation about docstring for PyGetSetDef #1248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 20, 2023
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