8000 Add "how to" for the setter Argument Clinic directive by corona10 · Pull Request #1245 · python/devguide · GitHub
[go: up one dir, main page]

Skip to content

Add "how to" for the setter Argument Clinic directive #1245

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 17 commits into from
Dec 13, 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
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
corona10 and AlexWaygood authored Dec 13, 2023
commit 0eaa5d7c08ecf9125369e640c7b1111213194615
6 changes: 3 additions & 3 deletions development-tools/clinic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2002,11 +2002,11 @@ The generated glue code looks like this:

.. _clinic-howto-pygetsetdef:

How to declare ``PyGetSetDef`` functions
----------------------------------------
How to declare ``PyGetSetDef`` ("getter/setter") functions
----------------------------------------------------------

"Getters" and "setters" are C functions defined in a :c:type:`PyGetSetDef` struct
that facilitate property-like access for a class.
that facilitate :py:class:`property`-like access for a class.
You can use the ``@getter`` and ``@setter`` directives to generate
"impl" functions for these.

Expand Down
0