Lines Matching defs:tuple
957 PyObject *tuple, *num;
960 tuple = PyTuple_New(1);
961 if (tuple == NULL)
968 PyTuple_SET_ITEM(tuple, 0, num);
971 if (!PyArg_ParseTuple(tuple, "L:test_L_code", &value)) {
983 PyTuple_SET_ITEM(tuple, 0, num);
986 if (!PyArg_ParseTuple(tuple, "L:test_L_code", &value)) {
993 Py_DECREF(tuple);
1365 /* Test tuple argument processing */
1538 PyObject *tuple, *num;
1541 tuple = PyTuple_New(1);
1542 if (tuple == NULL)
1555 PyTuple_SET_ITEM(tuple, 0, num);
1558 if (!PyArg_ParseTuple(tuple, "k:test_k_code", &value)) {
1576 PyTuple_SET_ITEM(tuple, 0, num);
1579 if (!PyArg_ParseTuple(tuple, "k:test_k_code", &value)) {
1586 Py_DECREF(tuple);
1897 PyObject *tuple, *obj;
1900 tuple = PyTuple_New(1);
1901 if (tuple == NULL)
1909 PyTuple_SET_ITEM(tuple, 0, obj);
1914 if (!PyArg_ParseTuple(tuple, "s:test_s_code1", &value)) {
1918 if (!PyArg_ParseTuple(tuple, "z:test_s_code2", &value)) {
1922 Py_DECREF(tuple);
1951 "parse_tuple_and_keywords: sub_keywords must be either list or tuple");
2007 PyObject *tuple, *obj;
2015 tuple = PyTuple_New(1);
2016 if (tuple == NULL)
2024 PyTuple_SET_ITEM(tuple, 0, obj);
2027 if (!PyArg_ParseTuple(tuple, "u:test_u_code", &value)) {
2034 if (!PyArg_ParseTuple(tuple, "u#:test_u_code", &value, &len)) {
2042 Py_DECREF(tuple);
2050 PyObject *tuple, *obj;
2054 tuple = PyTuple_New(2);
2055 if (tuple == NULL)
2059 PyTuple_SET_ITEM(tuple, 0, obj);
2061 PyTuple_SET_ITEM(tuple, 1, Py_None);
2068 if (!PyArg_ParseTuple(tuple, "ZZ:test_Z_code", &value1, &value2)) {
2084 if (!PyArg_ParseTuple(tuple, "Z#Z#:test_Z_code", &value1, &len1,
2098 Py_DECREF(tuple);
2416 PyObject *tuple, *dict = NULL;
2419 tuple = PyTuple_New(0);
2420 if (!tuple)
2422 if (!(result = PyArg_ParseTuple(tuple, "|:test_empty_argparse"))) {
2428 result = PyArg_ParseTupleAndKeywords(tuple, dict, "|:test_empty_argparse", kwlist);
2430 Py_DECREF(tuple);
2914 // Construct the argument tuple
2943 // Construct the argument tuple
5241 PyErr_SetString(PyExc_TypeError, "args must be None or a tuple");
5320 PyErr_SetString(PyExc_TypeError, "kwnames must be None or a tuple");
5339 PyErr_SetString(PyExc_TypeError, "args must be a tuple");
5615 * They all return a tuple of their C-level arguments, with None instead
5657 PyObject *tuple = PyTuple_New(nargs);
5658 if (tuple == NULL) {
5663 PyTuple_SET_ITEM(tuple, i, args[i]);
5665 return tuple;
6127 PyErr_SetString(PyExc_TypeError, "args must be a tuple");
6182 PyErr_SetString(PyExc_TypeError, "closure must be a tuple of cells");
6249 PyErr_SetString(PyExc_TypeError, "co_varnames not tuple");
6267 PyErr_SetString(PyExc_TypeError, "co_cellvars not tuple");
6285 PyErr_SetString(PyExc_TypeError, "co_freevars not tuple");
6309 PyObject *tuple = NULL;
6320 tuple = PyTuple_Pack(3, what_obj, line_obj, arg);
6321 if (tuple == NULL) {
6324 PyTuple_SET_ITEM(tuple, 0, what_obj);
6325 if (PyList_Append(obj, tuple)) {
6332 Py_XDECREF(tuple);