Skip to content
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

Add native support for Python operators via Chapel operator overload #27098

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Apr 10, 2025

Adds native support for calling operator methods on Python objects via Chapel operators.

This allows users to natively write myPyObj + myOtherPyObj, rather than myPyObj.call('__add__', myOtherPyObj).

This PR also adds the pyType method to get the type of a Python object, essentially type(obj) in Python

Resolves #26911

  • start_test test/library/packages/Python with COMM=none and Python 3.13
  • start_test test/library/packages/Python with COMM=gasnet and Python 3.10

[Reviewed by @lydia-duncan]

Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 marked this pull request as ready for review April 11, 2025 16:22
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 requested a review from lydia-duncan April 11, 2025 18:55
Copy link
Member

@lydia-duncan lydia-duncan left a comment

Choose a reason for hiding this comment

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

Really minor nits, otherwise this is good to go!

Signed-off-by: Jade Abraham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Support Python operators on Python.Value
2 participants