Home
last modified time | relevance | path

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

/third_party/python/Python/
Dsysmodule.c1276 PyObject *firstiter = NULL; in sys_set_asyncgen_hooks() local
1281 &firstiter, &finalizer)) { in sys_set_asyncgen_hooks()
1300 if (firstiter && firstiter != Py_None) { in sys_set_asyncgen_hooks()
1301 if (!PyCallable_Check(firstiter)) { in sys_set_asyncgen_hooks()
1304 Py_TYPE(firstiter)->tp_name); in sys_set_asyncgen_hooks()
1307 if (_PyEval_SetAsyncGenFirstiter(firstiter) < 0) { in sys_set_asyncgen_hooks()
1311 else if (firstiter == Py_None && _PyEval_SetAsyncGenFirstiter(NULL) < 0) { in sys_set_asyncgen_hooks()
1337 PyObject *firstiter = _PyEval_GetAsyncGenFirstiter(); in sys_get_asyncgen_hooks_impl() local
1345 if (firstiter == NULL) { in sys_get_asyncgen_hooks_impl()
1346 firstiter = Py_None; in sys_get_asyncgen_hooks_impl()
[all …]
Dceval.c5619 _PyEval_SetAsyncGenFirstiter(PyObject *firstiter) in _PyEval_SetAsyncGenFirstiter() argument
5627 Py_XINCREF(firstiter); in _PyEval_SetAsyncGenFirstiter()
5628 Py_XSETREF(tstate->async_gen_firstiter, firstiter); in _PyEval_SetAsyncGenFirstiter()
/third_party/python/Lib/test/
Dtest_sys.py1512 self.assertIsNone(old.firstiter)
1515 firstiter = lambda *a: None function
1516 sys.set_asyncgen_hooks(firstiter=firstiter)
1518 self.assertIs(hooks.firstiter, firstiter)
1519 self.assertIs(hooks[0], firstiter)
1526 self.assertIs(hooks.firstiter, firstiter)
1527 self.assertIs(hooks[0], firstiter)
1533 self.assertIsNone(cur.firstiter)
/third_party/python/Objects/
Dgenobject.c1291 PyObject *firstiter; in async_gen_init_hooks() local
1307 firstiter = tstate->async_gen_firstiter; in async_gen_init_hooks()
1308 if (firstiter) { in async_gen_init_hooks()
1311 Py_INCREF(firstiter); in async_gen_init_hooks()
1312 res = PyObject_CallOneArg(firstiter, (PyObject *)o); in async_gen_init_hooks()
1313 Py_DECREF(firstiter); in async_gen_init_hooks()
/third_party/python/Doc/library/
Dsys.rst833 :class:`~collections.namedtuple` of the form `(firstiter, finalizer)`,
834 where *firstiter* and *finalizer* are expected to be either ``None`` or
1460 .. function:: set_asyncgen_hooks(firstiter, finalizer)
1463 :term:`asynchronous generator iterator` as an argument. The *firstiter*
/third_party/python/Lib/asyncio/
Dbase_events.py590 sys.set_asyncgen_hooks(firstiter=self._asyncgen_firstiter_hook,