Skip to content

Conversation

@corona10
Copy link
Member

@corona10corona10 commented Dec 10, 2023

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@corona10corona10 requested a review from hugovkDecember 11, 2023 06:50
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
@erlend-aasland
Copy link
Contributor

Hm, instead of having two how-to's -- one for @getter and one for @setter -- how about unifying them and creating a "How to declare PyGetSetDef functions"? After all, Argument Clinic's audience is (mainly) developers who are fairly comfortable with the C API.

@corona10corona10 reopened this Dec 11, 2023
@AlexWaygood
Copy link
Member

(I'm travelling right now, but will do my best to review this tomorrow or Wednesday!)

Copy link
Contributor

@erlend-aaslanderlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some suggestions.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
corona10and others added 2 commits December 13, 2023 10:18
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some minor points:

Comment on lines 2040 to 2041
And then the implementation will work the same as a Python method which is
decorated by :py:class:`property`.
Copy link
Member

@AlexWaygoodAlexWaygoodDec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this should be deleted; the Python REPL example at the bottom now has no introduction explaining what it's illustrating

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will supplement to the above descriptions.

Copy link
MemberAuthor

@corona10corona10Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. I think that "Getters" and "setters" are C functions defined in a :c:type:`PyGetSetDef` struct that facilitate :py:class:`property`-like access for a class will be enough for understand Python REPL..

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@corona10corona10 merged commit 47d44b3 into python:mainDec 13, 2023
@corona10corona10 deleted the ac-setter branch December 13, 2023 14:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@corona10@erlend-aasland@AlexWaygood@hugovk@ezio-melotti