Capsules — Python 3.14.7 documentation

docs.python.org

Tin mới

Weak Reference Objects

Python Module Index

3.14.7 Documentation

Python/C API reference manual

Concrete Objects Layer

Providing a C API for an Extension Module

Refer to Providing a C API for an Extension Module for more information on using these objects.

Safe to call without external synchronization on distinct objects

Retrieve the pointer stored in the capsule. On failure, set an exception and return NULL.

PyImport_ImportModule()

If name points to an attribute of some submodule or subpackage, this submodule or subpackage must be previously imported using other means (for example, by using PyImport_ImportModule()) for the attribute lookups to succ