Module Objects — Python 3.11.16 documentation

docs.python.org

Tin mới

Python Module Index

3.11.16 Documentation

Python/C API Reference Manual

Concrete Objects Layer

UnicodeEncodeError

Deprecated since version 3.2: PyModule_GetFilename() raises UnicodeEncodeError on unencodable filenames, use PyModule_GetFilenameObject() instead.

PyImport_AppendInittab()

Modules objects are usually created from extension modules (shared libraries which export an initialization function), or compiled-in modules (where the initialization function is added using PyImport_AppendInittab()). S

Building C and C++ Extensions

Modules objects are usually created from extension modules (shared libraries which export an initialization function), or compiled-in modules (where the initialization function is added using PyImport_AppendInittab()). S

Extending Embedded Python

Modules objects are usually created from extension modules (shared libraries which export an initialization function), or compiled-in modules (where the initialization function is added using PyImport_AppendInittab()). S

PyTypeObject.tp_clear

A clear function to call during GC clearing of the module object, or NULL if not needed.

Multi-phase initialization¶

An alternate way to specify extensions is to request “multi-phase initialization”. Extension modules created this way behave more like Python modules: the initialization is split between the creation phase, when the modu

Multi-phase initialization¶

An alternate way to specify extensions is to request “multi-phase initialization”. Extension modules created this way behave more like Python modules: the initialization is split between the creation phase, when the modu

Multi-phase initialization¶

An alternate way to specify extensions is to request “multi-phase initialization”. Extension modules created this way behave more like Python modules: the initialization is split between the creation phase, when the modu

importlib.machinery.ModuleSpec

Specifies a function that is called to create the module object itself. The value pointer of this slot must point to a function of the signature: