Add Keywords and NoArgs versions of PyAwaitable_AwaitFunction.#58
Closed
Add Keywords and NoArgs versions of PyAwaitable_AwaitFunction.#58
Conversation
✅ Deploy Preview for awaitable canceled.
|
3f0de3c to
89a63bc
Compare
ZeroIntensity
requested changes
Jan 10, 2025
Owner
ZeroIntensity
left a comment
There was a problem hiding this comment.
I don't see the need for this. There's no upstream equivalent of the proposed PyAwaitable_AwaitFunctionKeywords, so I don't think we're at liberty to start re-inventing the call API here.
Regarding PyAwaitable_AwaitFunctionNoArgs, I originally added PyAwaitable_AwaitFunction because I thought it would cover all bases, but I'm thinking otherwise now. If we add NoArgs, then why not OneArg? Why not CallMethodNoArgs? And so on. It's just too much messy maintenance to save a few lines of code.
I plan to remove PyAwaitable_AwaitFunction in 2.0.0. We shouldn't lean towards more APIs that involve automatically registering the result to the awaitable :(
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements #40.
I also added in a NoArgs version as well because I used it as a means to test my own C extension and simply left that in for this feature as others might want to call an awaitable without any args and without needing to implement their own function to calling them.