Function Objects — Python 3.14.7 documentation

docs.python.org

Tin mới

Instance Method Objects

Python Module Index

3.14.7 Documentation

Python/C API reference manual

Concrete Objects Layer

function.__module__

Return a new function object associated with the code object code. globals must be a dictionary with the global variables accessible to the function.

borrowed reference

Return a borrowed reference to the __module__ attribute of the function object op. It can be NULL.

PyErr_WriteUnraisable()

If event is PyFunction_EVENT_CREATE or PyFunction_EVENT_DESTROY then new_value will be NULL. Otherwise, new_value will hold a borrowed reference to the new value that is about to be stored in func for the attribute that