Lines Matching defs:value
19 static const char *NON_INIT_CORO_MSG = "can't send non-None value to a "
160 const char *msg = "can't send non-None value to a "
166 msg = "can't send non-None value to a "
194 only return value if called from send(). */
203 /* Push arg onto the frame's value stack */
305 return next yielded value or raise StopIteration.");
413 "throw(value)\n\
414 throw(type[,value[,tb]])\n\
416 Raise exception in generator, return next yielded value or raise\n\
528 /* Raising an instance. The value should be a dummy. */
531 "instance exception may not have a separate value");
604 * Set StopIteration with specified value. Value can be arbitrary object
610 _PyGen_SetStopIterationValue(PyObject *value)
614 if (value == NULL ||
615 (!PyTuple_Check(value) && !PyExceptionInstance_Check(value)))
618 PyErr_SetObject(PyExc_StopIteration, value);
624 * We do this to handle a situation when "value" is a tuple, in which
625 * case PyErr_SetObject would set the value of StopIteration to
630 e = PyObject_CallOneArg(PyExc_StopIteration, value);
640 * If StopIteration exception is set, fetches its 'value'
652 PyObject *value = NULL;
659 value = ((PyStopIterationObject *)ev)->value;
660 Py_INCREF(value);
663 /* Avoid normalisation and take ev as value.
665 * Normalization is required if the value is a tuple, in
666 * that case the value of StopIteration would be set to
671 value = ev;
679 value = ((PyStopIterationObject *)ev)->value;
680 Py_INCREF(value);
689 if (value == NULL) {
690 value = Py_None;
691 Py_INCREF(value);
693 *pvalue = value;
712 gen_set_name(PyGenObject *op, PyObject *value, void *Py_UNUSED(ignored))
716 if (value == NULL || !PyUnicode_Check(value)) {
721 Py_INCREF(value);
722 Py_XSETREF(op->gi_name, value);
734 gen_set_qualname(PyGenObject *op, PyObject *value, void *Py_UNUSED(ignored))
738 if (value == NULL || !PyUnicode_Check(value)) {
743 Py_INCREF(value);
744 Py_XSETREF(op->gi_qualname, value);
1158 return next iterated value or raise StopIteration.");
1161 "throw(value)\n\
1162 throw(type[,value[,traceback]])\n\
1164 Raise exception in coroutine, return next iterated value or raise\n\