Home
last modified time | relevance | path

Searched refs:gi_code (Results 1 – 14 of 14) sorted by relevance

/third_party/python/Lib/asyncio/
Dcoroutines.py79 def gi_code(self): member in CoroWrapper
80 return self.gen.gi_code
227 elif hasattr(coro, 'gi_code') and coro.gi_code:
228 coro_code = coro.gi_code
/third_party/python/Lib/
Dtypes.py226 def gi_code(self): member in _GeneratorWrapper
227 return self.__wrapped.gi_code
237 cr_code = gi_code
285 coro.__class__ is GeneratorType and coro.gi_code.co_flags & 0x100):
Ddis.py62 x = x.gi_code
137 x = x.gi_code
Dinspect.py352 bool(object.gi_code.co_flags & CO_ITERABLE_COROUTINE) or
/third_party/python/Objects/
Dgenobject.c35 Py_VISIT(gen->gi_code); in gen_traverse()
80 if (gen->gi_code != NULL && in _PyGen_Finalize()
81 ((PyCodeObject *)gen->gi_code)->co_flags & CO_COROUTINE && in _PyGen_Finalize()
129 if (((PyCodeObject *)gen->gi_code)->co_flags & CO_COROUTINE) { in gen_dealloc()
132 Py_CLEAR(gen->gi_code); in gen_dealloc()
758 {"gi_code", T_OBJECT, offsetof(PyGenObject, gi_code), READONLY|PY_AUDIT_READ},
842 gen->gi_code = (PyObject *)(f->f_code); in gen_new_with_qualname()
851 gen->gi_name = ((PyCodeObject *)gen->gi_code)->co_name; in gen_new_with_qualname()
885 PyCodeObject *code = (PyCodeObject *)((PyGenObject*)o)->gi_code; in gen_is_coroutine()
/third_party/python/Lib/test/
Dtest_types.py1871 gen.gi_code = object()
1875 self.assertIs(wrapper.gi_code, gen.gi_code)
1879 self.assertIs(wrapper.cr_code, gen.gi_code)
2002 self.assertIs(foo().cr_code, gen.gi_code)
2045 self.assertTrue(g.gi_code.co_flags & inspect.CO_ITERABLE_COROUTINE)
2046 self.assertFalse(g.gi_code.co_flags & inspect.CO_COROUTINE)
Dtest_generators.py523 self.assertEqual(gen_b.gi_yieldfrom.gi_code.co_name, 'a')
Dtest_coroutines.py921 self.assertEqual(coro_b.cr_await.cr_await.gi_code.co_name, 'a')
/third_party/python/Lib/test/test_asyncio/
Dtest_tasks.py491 code = gen.gi_code
506 code = gen.gi_code
2314 self.assertIsInstance(gen.gi_code, types.CodeType)
/third_party/python/Misc/NEWS.d/
D3.5.0a1.rst462 instead of the code. Use ``gen.gi_code.co_name`` to get the name of the
2891 gi_code attribute. Patch by Clement Rouault.
/third_party/python/Doc/library/
Dinspect.rst210 | | gi_code | code |
/third_party/python/Doc/whatsnew/
D3.5.rst2413 instead of being set from the code name. Use ``gen.gi_code.co_name`` to
D2.6.rst1652 * Generator objects now have a :attr:`gi_code` attribute that refers to
/third_party/python/Misc/
DHISTORY16647 equals ``gen.gi_code.co_name``, like ``func.__name___`` that equals