deimos.python.funcobject

Mirror funcobject.h

Function object interface

Function objects and code objects should not be confused with each other:

Function objects are created by the execution of the 'def' statement. They reference a code object in their func_code attribute, which is a purely syntactic object, i.e. nothing more than a compiled version of some source code lines. There is one code object per source code "fragment", but each code object can be referenced by zero or many function objects depending only on how many times the 'def' statement in the source was executed so far.

Members

Functions

PyClassMethod_New
PyObject* PyClassMethod_New(PyObject* )

_

PyFunction_Check
int PyFunction_Check(PyObject* op)

_

PyFunction_GET_ANNOTATIONS
Borrowed!PyObject* PyFunction_GET_ANNOTATIONS(PyObject* func)

Availability: 3.*

PyFunction_GET_CLOSURE
Borrowed!PyObject* PyFunction_GET_CLOSURE(PyObject* func)

_

PyFunction_GET_CODE
Borrowed!PyObject* PyFunction_GET_CODE(PyObject* func)
PyFunction_GET_DEFAULTS
Borrowed!PyObject* PyFunction_GET_DEFAULTS(PyObject* func)
PyFunction_GET_GLOBALS
Borrowed!PyObject* PyFunction_GET_GLOBALS(PyObject* func)

Macros for direct access to these values. Type checks are *not* done, so use with care.

PyFunction_GET_KW_DEFAULTS
Borrowed!PyObject* PyFunction_GET_KW_DEFAULTS(PyObject* func)

Availability: 3.*

PyFunction_GET_MODULE
Borrowed!PyObject* PyFunction_GET_MODULE(PyObject* func)

Macros for direct access to these values. Type checks are *not* done, so use with care.

PyFunction_GetAnnotations
Borrowed!PyObject* PyFunction_GetAnnotations(PyObject* )

Availability: 3.*

PyFunction_GetClosure
PyObject_BorrowedRef* PyFunction_GetClosure(PyObject* )

_

PyFunction_GetCode
PyObject_BorrowedRef* PyFunction_GetCode(PyObject* )

_

PyFunction_GetDefaults
PyObject_BorrowedRef* PyFunction_GetDefaults(PyObject* )

_

PyFunction_GetGlobals
PyObject_BorrowedRef* PyFunction_GetGlobals(PyObject* )

_

PyFunction_GetKwDefaults
Borrowed!PyObject* PyFunction_GetKwDefaults(PyObject* )

Availability: 3.*

PyFunction_GetModule
PyObject_BorrowedRef* PyFunction_GetModule(PyObject* )

_

PyFunction_New
PyObject* PyFunction_New(PyObject* , PyObject* )

_

PyFunction_SetAnnotations
int PyFunction_SetAnnotations(PyObject* , PyObject* )

Availability: 3.*

PyFunction_SetClosure
int PyFunction_SetClosure(PyObject* , PyObject* )

_

PyFunction_SetDefaults
int PyFunction_SetDefaults(PyObject* , PyObject* )

_

PyFunction_SetKwDefaults
int PyFunction_SetKwDefaults(PyObject* , PyObject* )

Availability: 3.*

PyStaticMethod_New
PyObject* PyStaticMethod_New(PyObject* )

_

Structs

PyFunctionObject
struct PyFunctionObject

subclass of PyObject

Meta