Home
last modified time | relevance | path

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

/external/python/cpython3/Python/
Dsysmodule.c858 PyObject *firstiter = NULL; in sys_set_asyncgen_hooks() local
863 &firstiter, &finalizer)) { in sys_set_asyncgen_hooks()
880 if (firstiter && firstiter != Py_None) { in sys_set_asyncgen_hooks()
881 if (!PyCallable_Check(firstiter)) { in sys_set_asyncgen_hooks()
884 Py_TYPE(firstiter)->tp_name); in sys_set_asyncgen_hooks()
887 _PyEval_SetAsyncGenFirstiter(firstiter); in sys_set_asyncgen_hooks()
889 else if (firstiter == Py_None) { in sys_set_asyncgen_hooks()
906 PyObject *firstiter = _PyEval_GetAsyncGenFirstiter(); in sys_get_asyncgen_hooks() local
914 if (firstiter == NULL) { in sys_get_asyncgen_hooks()
915 firstiter = Py_None; in sys_get_asyncgen_hooks()
[all …]
Dceval.c4381 _PyEval_SetAsyncGenFirstiter(PyObject *firstiter) in _PyEval_SetAsyncGenFirstiter() argument
4385 Py_XINCREF(firstiter); in _PyEval_SetAsyncGenFirstiter()
4386 Py_XSETREF(tstate->async_gen_firstiter, firstiter); in _PyEval_SetAsyncGenFirstiter()
/external/python/cpython3/Lib/test/
Dtest_sys.py1239 self.assertIsNone(old.firstiter)
1242 firstiter = lambda *a: None function
1243 sys.set_asyncgen_hooks(firstiter=firstiter)
1245 self.assertIs(hooks.firstiter, firstiter)
1246 self.assertIs(hooks[0], firstiter)
1253 self.assertIs(hooks.firstiter, firstiter)
1254 self.assertIs(hooks[0], firstiter)
1260 self.assertIsNone(cur.firstiter)
/external/python/cpython3/Objects/
Dgenobject.c1264 PyObject *firstiter; in async_gen_init_hooks() local
1280 firstiter = tstate->async_gen_firstiter; in async_gen_init_hooks()
1281 if (firstiter) { in async_gen_init_hooks()
1284 Py_INCREF(firstiter); in async_gen_init_hooks()
1285 res = PyObject_CallFunctionObjArgs(firstiter, o, NULL); in async_gen_init_hooks()
1286 Py_DECREF(firstiter); in async_gen_init_hooks()
/external/python/cpython3/Doc/library/
Dsys.rst669 :class:`~collections.namedtuple` of the form `(firstiter, finalizer)`,
670 where *firstiter* and *finalizer* are expected to be either ``None`` or
1239 .. function:: set_asyncgen_hooks(firstiter, finalizer)
1242 :term:`asynchronous generator iterator` as an argument. The *firstiter*
/external/python/cpython3/Lib/asyncio/
Dbase_events.py534 sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook,