Home
last modified time | relevance | path

Searched refs:firstiter (Results 1 – 6 of 6) sorted by relevance

/external/python/cpython3/Python/
Dsysmodule.c719 PyObject *firstiter = NULL; in sys_set_asyncgen_hooks() local
724 &firstiter, &finalizer)) { in sys_set_asyncgen_hooks()
741 if (firstiter && firstiter != Py_None) { in sys_set_asyncgen_hooks()
742 if (!PyCallable_Check(firstiter)) { in sys_set_asyncgen_hooks()
745 Py_TYPE(firstiter)->tp_name); in sys_set_asyncgen_hooks()
748 _PyEval_SetAsyncGenFirstiter(firstiter); in sys_set_asyncgen_hooks()
750 else if (firstiter == Py_None) { in sys_set_asyncgen_hooks()
767 PyObject *firstiter = _PyEval_GetAsyncGenFirstiter(); in sys_get_asyncgen_hooks() local
775 if (firstiter == NULL) { in sys_get_asyncgen_hooks()
776 firstiter = Py_None; in sys_get_asyncgen_hooks()
[all …]
Dceval.c4590 _PyEval_SetAsyncGenFirstiter(PyObject *firstiter) in _PyEval_SetAsyncGenFirstiter() argument
4594 Py_XINCREF(firstiter); in _PyEval_SetAsyncGenFirstiter()
4595 Py_XSETREF(tstate->async_gen_firstiter, firstiter); in _PyEval_SetAsyncGenFirstiter()
/external/python/cpython3/Lib/test/
Dtest_sys.py1197 self.assertIsNone(old.firstiter)
1200 firstiter = lambda *a: None function
1201 sys.set_asyncgen_hooks(firstiter=firstiter)
1203 self.assertIs(hooks.firstiter, firstiter)
1204 self.assertIs(hooks[0], firstiter)
1211 self.assertIs(hooks.firstiter, firstiter)
1212 self.assertIs(hooks[0], firstiter)
1218 self.assertIsNone(cur.firstiter)
/external/python/cpython3/Objects/
Dgenobject.c1323 PyObject *firstiter; in async_gen_init_hooks() local
1339 firstiter = tstate->async_gen_firstiter; in async_gen_init_hooks()
1340 if (firstiter) { in async_gen_init_hooks()
1343 Py_INCREF(firstiter); in async_gen_init_hooks()
1344 res = PyObject_CallFunction(firstiter, "O", o); in async_gen_init_hooks()
1345 Py_DECREF(firstiter); in async_gen_init_hooks()
/external/python/cpython3/Doc/library/
Dsys.rst601 :class:`~collections.namedtuple` of the form `(firstiter, finalizer)`,
602 where *firstiter* and *finalizer* are expected to be either ``None`` or
1119 .. function:: set_asyncgen_hooks(firstiter, finalizer)
1122 :term:`asynchronous generator iterator` as an argument. The *firstiter*
/external/python/cpython3/Lib/asyncio/
Dbase_events.py416 sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook,