[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Py_BuildValue vs PyTuple_Pack vs PyTuple_New

I read these three C api functions, They are similar, because they all
construct a tuple[1].

IMHO, Py_BuildValue is more simple to use than PyTuple_Pack that is more
simple to use than PyTuple_New.

Where to use one or the other? What's the relative performance of the three

[1] actually, Py_BuildValue can also return non-tuple objects.