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

bpo-37547: add _PyObject_CallMethodOneArg #14685

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

jdemeyer
Copy link
Contributor

@jdemeyer jdemeyer commented Jul 10, 2019

Copy link
Contributor

@aeros aeros left a comment

Choose a reason for hiding this comment

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

In a similar theme to the proposed CallMethodOneArg() and existing CallNoArg(), CallOneArg(), and CallMethodNoArgs(), would it make sense to also have a VectorcallNoKws()? There's several instances where Vectorcall() is being used with a null value for the kwnames argument.

Edit: This would probably be in it's own separate PR and issue, not this one

@jdemeyer
Copy link
Contributor Author

There's several instances where Vectorcall() is being used with a null value for the kwnames argument.

There are only very few such use cases. It we would add another function in similar spirit, I think that _PyObject_CallTwoArgs() would make the most sense and that was rejected.

@methane methane merged commit 59ad110 into python:master Jul 11, 2019
@methane
Copy link
Member

methane commented Jul 11, 2019

would it make sense to also have a VectorcallNoKws()?

No. Passing NULL is not so hard, compared to (PyObject*[]){self, arg}.

@jdemeyer jdemeyer deleted the callmethod_one_arg branch July 11, 2019 09:02
@aeros
Copy link
Contributor

aeros commented Jul 11, 2019

@jdemeyer @methane Thanks for the clarification.

lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Sign up for free to 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