-
Notifications
You must be signed in to change notification settings - Fork 424
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
Refactor Python module API to prefer methods over constructors #26695
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This looks like a great improvement. I have some comments inline, though most of them are minor
dc57d7a
to
52d497d
Compare
Signed-off-by: Jade Abraham <[email protected]>
52d497d
to
38412db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
After fixing the docs build, I followed up with a few more doc improvement tweaks in 9dc61a9 |
Refactors the Python module API to prefer methods over constructors. The old constructors are still available and still useful in some places, but for the most part users should prefer the new API.
Old style
New style
This PR also makes a few other changes
renamed the internal
.get
to.getPyObject
renamed
getAttr
/setAttr
toget
/set
renamed
getIdx
/setIdx
toget
/set
added support for passing kwargs to
.call
made a variety of doc cleanups/reordered code for better clarity
st test/library/packages/Python
st test/library/packages/Python
with GASNet[Reviewed by @lydia-duncan]