We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Py_BuildValue("(OO...)", a, b, ...)
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
This is an inefficient way to build a tuple:
Py_BuildValue("(OO)", a, b)
This is faster, and more readable:
PyTuple_Pack(2, a, b)
And if #118222 lands, we could use this even faster variant for length 1 & 2:
PyTuple_Pack2( a, b)
No response given
No response
The text was updated successfully, but these errors were encountered:
I already did something similar recently: #110093.
Sorry, something went wrong.
gh-118379: Use PyTuple_Pack instead of Py_BuildValue if possible (GH-…
9a75d56
…118381)
pythongh-118379: Use PyTuple_Pack instead of Py_BuildValue if possible (
28ab858
pythonGH-118381)
No branches or pull requests
Feature or enhancement
Proposal:
This is an inefficient way to build a tuple:
This is faster, and more readable:
And if #118222 lands, we could use this even faster variant for length 1 & 2:
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: