Skip to content

Commit

Permalink
Add explanation about docstring for PyGetSetDef (gh-1248)
Browse files Browse the repository at this point in the history
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
  • Loading branch information
corona10 and ezio-melotti committed Dec 20, 2023
1 parent 4cbaee5 commit 008be35
Showing 1 changed file with 2 additions and 0 deletions.
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.
It is possible to create a docstring for the property by adding it to
the ``@getter``.

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

0 comments on commit 008be35

Please sign in to comment.