ਕੋਰੂਟੀਨ ਆਬਜੈਕਟ¶
Added in version 3.5.
ਕੋਰੂਟੀਨ ਆਬਜੈਕਟ ਉਹ ਹੁੰਦੇ ਹਨ ਜੋ async ਕੀਵਰਡ ਨਾਲ ਘੋਸ਼ਿਤ ਕੀਤੇ ਗਏ ਫੰਕਸ਼ਨ ਵਾਪਸ ਕਰਦੇ ਹਨ।
-
type PyCoroObject¶
ਕੋਰੂਟੀਨ ਆਬਜੈਕਟਾਂ ਲਈ ਵਰਤੀ ਜਾਣ ਵਾਲੀ C ਸੰਰਚਨਾ।
-
PyTypeObject PyCoro_Type¶
ਕੋਰੂਟੀਨ ਆਬਜੈਕਟਾਂ ਨਾਲ ਸੰਬੰਧਿਤ ਕਿਸਮ ਆਬਜੈਕਟ।
-
int PyCoro_CheckExact(PyObject *ob)¶
ਜੇ ob ਦੀ ਕਿਸਮ
PyCoro_Typeਹੈ ਤਾਂ true ਵਾਪਸ ਕਰੋ; obNULLਨਹੀਂ ਹੋਣਾ ਚਾਹੀਦਾ। ਇਹ ਫੰਕਸ਼ਨ ਹਮੇਸ਼ਾਂ ਸਫਲ ਹੁੰਦਾ ਹੈ।
-
PyObject *PyCoro_New(PyFrameObject *frame, PyObject *name, PyObject *qualname)¶
- Return value: New reference.
frame ਆਬਜੈਕਟ ਦੇ ਆਧਾਰ 'ਤੇ ਇੱਕ ਨਵਾਂ ਕੋਰੂਟੀਨ ਆਬਜੈਕਟ ਬਣਾਓ ਅਤੇ ਵਾਪਸ ਕਰੋ, ਜਿਸ ਵਿੱਚ
__name__ਅਤੇ__qualname__ਨੂੰ ਕ੍ਰਮਵਾਰ name ਅਤੇ qualname 'ਤੇ ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਹੋਵੇ। ਇਹ ਫੰਕਸ਼ਨ frame ਦੇ ਹਵਾਲੇ ਦਾ ਮਾਲਕਾਨਾ ਆਪਣੇ ਕੋਲ ਲੈ ਲੈਂਦਾ ਹੈ। frame ਆਰਗੂਮੈਂਟNULLਨਹੀਂ ਹੋਣਾ ਚਾਹੀਦਾ।Deprecated since version 3.16, will be removed in version 3.18: This function has not been used since 3.10. It is also impossible to construct a proper frame object to call this function.