-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow users to omit the return type on some Python calls (#26663)
Allows users to omit the return type on a call to Python code when they don't care what the type is. The defaults to `owned Value`, which is a wrapper around the underlying type. This `Value` can be captured by users and later converted to a Chapel type, continue to be used by other functions as a `Value` type (with no extra overhead), or ignored all together (in the case a function from python doesn't return anything). This significantly cleans up some user-facing Python code Before this PR ```chapel doNothing(NoneType); funcReturnsNothing(NoneType, 1, 2, 3); var x: owned Value = getAValue(owned Value); ``` After this PR ```chapel doNothing(); funcReturnsNothing(1, 2, 3); var x: owned Value = getAValue(); ``` - [x] ran `start_test test/library/packages/Python/` [Reviewed by @lydia-duncan]
- Loading branch information
Showing
18 changed files
with
267 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.