Lines Matching refs:state
339 PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
342 groupby_setstate(groupbyobject *lz, PyObject *state)
345 if (!PyTuple_Check(state)) {
346 PyErr_SetString(PyExc_TypeError, "state is not a tuple");
349 if (!PyArg_ParseTuple(state, "OOO", &currkey, &currvalue, &tgtkey)) {
361 PyDoc_STRVAR(setstate_doc, "Set state information for unpickling.");
932 tee_setstate(teeobject *to, PyObject *state)
936 if (!PyTuple_Check(state)) {
937 PyErr_SetString(PyExc_TypeError, "state is not a tuple");
940 if (!PyArg_ParseTuple(state, "O!i", &teedataobject_type, &tdo, &index)) {
1174 /* Create a new cycle with the iterator tuple, then set the saved state */
1195 cycle_setstate(cycleobject *lz, PyObject *state)
1199 if (!PyTuple_Check(state)) {
1200 PyErr_SetString(PyExc_TypeError, "state is not a tuple");
1204 if (!PyArg_ParseTuple(state, "O!i", &PyList_Type, &saved, &firstpass)) {
1370 dropwhile_setstate(dropwhileobject *lz, PyObject *state)
1372 int start = PyObject_IsTrue(state);
1529 takewhile_reduce_setstate(takewhileobject *lz, PyObject *state)
1531 int stop = PyObject_IsTrue(state);
1778 islice_setstate(isliceobject *lz, PyObject *state)
1780 Py_ssize_t cnt = PyLong_AsSsize_t(state);
2129 chain_setstate(chainobject *lz, PyObject *state)
2133 if (!PyTuple_Check(state)) {
2134 PyErr_SetString(PyExc_TypeError, "state is not a tuple");
2137 if (!PyArg_ParseTuple(state, "O|O", &source, &active)) {
2459 product_setstate(productobject *lz, PyObject *state)
2465 if (!PyTuple_Check(state) || PyTuple_GET_SIZE(state) != n) {
2471 PyObject* indexObject = PyTuple_GET_ITEM(state, i);
2789 combinations_setstate(combinationsobject *lz, PyObject *state)
2795 if (!PyTuple_Check(state) || PyTuple_GET_SIZE(state) != lz->r) {
2802 PyObject* indexObject = PyTuple_GET_ITEM(state, i);
3119 cwr_setstate(cwrobject *lz, PyObject *state)
3124 if (!PyTuple_Check(state) || PyTuple_GET_SIZE(state) != lz->r)
3132 PyObject* indexObject = PyTuple_GET_ITEM(state, i);
3491 permutations_setstate(permutationsobject *po, PyObject *state)
3496 if (!PyTuple_Check(state)) {
3497 PyErr_SetString(PyExc_TypeError, "state is not a tuple");
3500 if (!PyArg_ParseTuple(state, "O!O!",
3749 accumulate_setstate(accumulateobject *lz, PyObject *state)
3751 Py_INCREF(state);
3752 Py_XSETREF(lz->total, state);
4736 zip_longest_setstate(ziplongestobject *lz, PyObject *state)
4738 Py_INCREF(state);
4739 Py_XSETREF(lz->fillvalue, state);