Staging
v0.5.1
Revision f53ea8adaecacfe8c1e4a093136fb5318b15d779 authored by Miss Skeleton (bot) on 20 October 2020, 12:11:25 UTC, committed by GitHub on 20 October 2020, 12:11:25 UTC
(cherry picked from commit ff1ae3dd334faa2006394c2318db385cdc42030a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
1 parent 4cde523
Raw File
coro.rst
.. highlight:: c

.. _coro-objects:

Coroutine Objects
-----------------

.. versionadded:: 3.5

Coroutine objects are what functions declared with an ``async`` keyword
return.


.. c:type:: PyCoroObject

   The C structure used for coroutine objects.


.. c:var:: PyTypeObject PyCoro_Type

   The type object corresponding to coroutine objects.


.. c:function:: int PyCoro_CheckExact(PyObject *ob)

   Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be ``NULL``.


.. c:function:: PyObject* PyCoro_New(PyFrameObject *frame, PyObject *name, PyObject *qualname)

   Create and return a new coroutine object based on the *frame* object,
   with ``__name__`` and ``__qualname__`` set to *name* and *qualname*.
   A reference to *frame* is stolen by this function.  The *frame* argument
   must not be ``NULL``.
back to top