协程对象 ¶
Added in version 3.5.
Coroutine objects are what functions declared with an
async
keyword return.
-
type
PyCoroObject
¶
-
The C structure used for coroutine objects.
-
PyTypeObject
PyCoro_Type
¶
-
The type object corresponding to coroutine objects.
-
int
PyCoro_CheckExact
(
PyObject
*
ob
)
¶
-
返回 True 若 ob ’s type is
PyCoro_Type; ob 不得为NULL. This function always succeeds.
-
PyObject
*
PyCoro_New
(
PyFrameObject
*
frame
,
PyObject
*
名称
,
PyObject
*
qualname
)
¶
-
返回值:新引用。
Create and return a new coroutine object based on the frame object, with
__name__and__qualname__设为 name and qualname . A reference to frame is stolen by this function. The frame argument must not beNULL.