replaced Py_BuildValue by PyTuple_Pack