mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	 315fc52db1
			
		
	
	
		315fc52db1
		
			
		
	
	
	
	
		
			
			I think that none of these API calls can fail, but only few of them are documented as such. Add the sentence "This function always succeeds" (which is the same already used e.g. by PyNumber_Check) to all of them.
		
			
				
	
	
		
			35 lines
		
	
	
	
		
			862 B
		
	
	
	
		
			ReStructuredText
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
	
		
			862 B
		
	
	
	
		
			ReStructuredText
		
	
	
	
	
	
| .. 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``.
 | |
|    This function always succeeds.
 | |
| 
 | |
| 
 | |
| .. 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``.
 |