Документация Python неофициальный перевод

index.md

119 строк · 11.8 КБ · обычная страница · сырой текст · скачать

1> **Источник:** https://python-all.ru/3.12/c-api/index.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Справочное руководство по Python/C API89В данном руководстве описано API для программистов на C и C++, которые хотят создавать модули расширения или встраивать Python. Оно является дополнением к [Расширение и встраивание интерпретатора Python](https://python-all.ru/3.12/extending/index.html#extending-index), в котором описаны общие принципы написания расширений, но нет подробной документации по функциям API.1011- [Введение](https://python-all.ru/3.12/c-api/intro.html)1213  - [Стандарты кодирования](https://python-all.ru/3.12/c-api/intro.html#coding-standards)14  - [Заголовочные файлы](https://python-all.ru/3.12/c-api/intro.html#include-files)15  - [Полезные макросы](https://python-all.ru/3.12/c-api/intro.html#useful-macros)16  - [Объекты, типы и счетчики ссылок](https://python-all.ru/3.12/c-api/intro.html#objects-types-and-reference-counts)17  - [Исключения](https://python-all.ru/3.12/c-api/intro.html#exceptions)18  - [Встраивание Python](https://python-all.ru/3.12/c-api/intro.html#embedding-python)19  - [Отладочные сборки](https://python-all.ru/3.12/c-api/intro.html#debugging-builds)20- [Стабильность C API](https://python-all.ru/3.12/c-api/stable.html)2122  - [Нестабильное C API](https://python-all.ru/3.12/c-api/stable.html#unstable-c-api)23  - [Стабильный ABI](https://python-all.ru/3.12/c-api/stable.html#stable-application-binary-interface)24  - [Особенности платформ](https://python-all.ru/3.12/c-api/stable.html#platform-considerations)25  - [Содержимое ограниченного API](https://python-all.ru/3.12/c-api/stable.html#contents-of-limited-api)26- [Очень высокоуровневый слой](https://python-all.ru/3.12/c-api/veryhigh.html)27- [Подсчёт ссылок](https://python-all.ru/3.12/c-api/refcounting.html)28- [Обработка исключений](https://python-all.ru/3.12/c-api/exceptions.html)2930  - [Вывод и очистка](https://python-all.ru/3.12/c-api/exceptions.html#printing-and-clearing)31  - [Возбуждение исключений](https://python-all.ru/3.12/c-api/exceptions.html#raising-exceptions)32  - [Выдача предупреждений](https://python-all.ru/3.12/c-api/exceptions.html#issuing-warnings)33  - [Запрос индикатора ошибки](https://python-all.ru/3.12/c-api/exceptions.html#querying-the-error-indicator)34  - [Обработка сигналов](https://python-all.ru/3.12/c-api/exceptions.html#signal-handling)35  - [Классы исключений](https://python-all.ru/3.12/c-api/exceptions.html#exception-classes)36  - [Объекты исключений](https://python-all.ru/3.12/c-api/exceptions.html#exception-objects)37  - [Объекты исключений Unicode](https://python-all.ru/3.12/c-api/exceptions.html#unicode-exception-objects)38  - [Управление рекурсией](https://python-all.ru/3.12/c-api/exceptions.html#recursion-control)39  - [Стандартные исключения](https://python-all.ru/3.12/c-api/exceptions.html#standard-exceptions)40  - [Стандартные категории предупреждений](https://python-all.ru/3.12/c-api/exceptions.html#standard-warning-categories)41- [Утилиты](https://python-all.ru/3.12/c-api/utilities.html)4243  - [Утилиты операционной системы](https://python-all.ru/3.12/c-api/sys.html)44  - [Системные функции](https://python-all.ru/3.12/c-api/sys.html#system-functions)45  - [Управление процессами](https://python-all.ru/3.12/c-api/sys.html#process-control)46  - [Импорт модулей](https://python-all.ru/3.12/c-api/import.html)47  - [Поддержка маршалинга данных](https://python-all.ru/3.12/c-api/marshal.html)48  - [Разбор аргументов и сборка значений](https://python-all.ru/3.12/c-api/arg.html)49  - [Преобразование и форматирование строк](https://python-all.ru/3.12/c-api/conversion.html)50  - [PyHash API](https://python-all.ru/3.12/c-api/hash.html)51  - [Рефлексия](https://python-all.ru/3.12/c-api/reflection.html)52  - [Реестр кодировок и вспомогательные функции](https://python-all.ru/3.12/c-api/codec.html)53  - [Поддержка карт производительности](https://python-all.ru/3.12/c-api/perfmaps.html)54- [Слой абстрактных объектов](https://python-all.ru/3.12/c-api/abstract.html)5556  - [Протокол объекта](https://python-all.ru/3.12/c-api/object.html)57  - [Протокол вызова](https://python-all.ru/3.12/c-api/call.html)58  - [Протокол чисел](https://python-all.ru/3.12/c-api/number.html)59  - [Протокол последовательностей](https://python-all.ru/3.12/c-api/sequence.html)60  - [Протокол отображений](https://python-all.ru/3.12/c-api/mapping.html)61  - [Протокол итератора](https://python-all.ru/3.12/c-api/iter.html)62  - [Протокол буфера](https://python-all.ru/3.12/c-api/buffer.html)63  - [Старый буферный протокол](https://python-all.ru/3.12/c-api/objbuffer.html)64- [Слой конкретных объектов](https://python-all.ru/3.12/c-api/concrete.html)6566  - [Базовые объекты](https://python-all.ru/3.12/c-api/concrete.html#fundamental-objects)67  - [Числовые объекты](https://python-all.ru/3.12/c-api/concrete.html#numeric-objects)68  - [Объекты последовательностей](https://python-all.ru/3.12/c-api/concrete.html#sequence-objects)69  - [Объекты контейнеров](https://python-all.ru/3.12/c-api/concrete.html#container-objects)70  - [Объекты функций](https://python-all.ru/3.12/c-api/concrete.html#function-objects)71  - [Прочие объекты](https://python-all.ru/3.12/c-api/concrete.html#other-objects)72- [Инициализация, финализация и потоки](https://python-all.ru/3.12/c-api/init.html)7374  - [Перед инициализацией Python](https://python-all.ru/3.12/c-api/init.html#before-python-initialization)75  - [Глобальные переменные конфигурации](https://python-all.ru/3.12/c-api/init.html#global-configuration-variables)76  - [Инициализация и финализация интерпретатора](https://python-all.ru/3.12/c-api/init.html#initializing-and-finalizing-the-interpreter)77  - [Параметры уровня процесса](https://python-all.ru/3.12/c-api/init.html#process-wide-parameters)78  - [Состояние потока и глобальная блокировка интерпретатора](https://python-all.ru/3.12/c-api/init.html#thread-state-and-the-global-interpreter-lock)79  - [Поддержка под-интерпретаторов](https://python-all.ru/3.12/c-api/init.html#sub-interpreter-support)80  - [Асинхронные уведомления](https://python-all.ru/3.12/c-api/init.html#asynchronous-notifications)81  - [Профилирование и трассировка](https://python-all.ru/3.12/c-api/init.html#profiling-and-tracing)82  - [Расширенная поддержка отладчика](https://python-all.ru/3.12/c-api/init.html#advanced-debugger-support)83  - [Поддержка локального хранилища потоков](https://python-all.ru/3.12/c-api/init.html#thread-local-storage-support)84- [Конфигурация инициализации Python](https://python-all.ru/3.12/c-api/init_config.html)8586  - [Пример](https://python-all.ru/3.12/c-api/init_config.html#example)87  - [PyWideStringList](https://python-all.ru/3.12/c-api/init_config.html#pywidestringlist)88  - [PyStatus](https://python-all.ru/3.12/c-api/init_config.html#pystatus)89  - [PyPreConfig](https://python-all.ru/3.12/c-api/init_config.html#pypreconfig)90  - [Предварительная инициализация Python с помощью PyPreConfig](https://python-all.ru/3.12/c-api/init_config.html#preinitialize-python-with-pypreconfig)91  - [PyConfig](https://python-all.ru/3.12/c-api/init_config.html#pyconfig)92  - [Инициализация с помощью PyConfig](https://python-all.ru/3.12/c-api/init_config.html#initialization-with-pyconfig)93  - [Изолированная конфигурация](https://python-all.ru/3.12/c-api/init_config.html#isolated-configuration)94  - [Конфигурация Python](https://python-all.ru/3.12/c-api/init_config.html#python-configuration)95  - [Конфигурация путей Python](https://python-all.ru/3.12/c-api/init_config.html#python-path-configuration)96  - [Py\_RunMain()](https://python-all.ru/3.12/c-api/init_config.html#py-runmain)97  - [Py\_GetArgcArgv()](https://python-all.ru/3.12/c-api/init_config.html#py-getargcargv)98  - [Приватный предварительный API многофазной инициализации](https://python-all.ru/3.12/c-api/init_config.html#multi-phase-initialization-private-provisional-api)99- [Управление памятью](https://python-all.ru/3.12/c-api/memory.html)100101  - [Обзор](https://python-all.ru/3.12/c-api/memory.html#overview)102  - [Домены аллокаторов](https://python-all.ru/3.12/c-api/memory.html#allocator-domains)103  - [Интерфейс низкоуровневой памяти](https://python-all.ru/3.12/c-api/memory.html#raw-memory-interface)104  - [Интерфейс памяти](https://python-all.ru/3.12/c-api/memory.html#memory-interface)105  - [Аллокаторы объектов](https://python-all.ru/3.12/c-api/memory.html#object-allocators)106  - [Аллокаторы памяти по умолчанию](https://python-all.ru/3.12/c-api/memory.html#default-memory-allocators)107  - [Настройка аллокаторов памяти](https://python-all.ru/3.12/c-api/memory.html#customize-memory-allocators)108  - [Отладочные перехватчики аллокаторов памяти Python](https://python-all.ru/3.12/c-api/memory.html#debug-hooks-on-the-python-memory-allocators)109  - [Аллокатор pymalloc](https://python-all.ru/3.12/c-api/memory.html#the-pymalloc-allocator)110  - [C API модуля tracemalloc](https://python-all.ru/3.12/c-api/memory.html#tracemalloc-c-api)111  - [Примеры](https://python-all.ru/3.12/c-api/memory.html#examples)112- [Поддержка реализации объектов](https://python-all.ru/3.12/c-api/objimpl.html)113114  - [Выделение объектов в куче](https://python-all.ru/3.12/c-api/allocation.html)115  - [Общие структуры объектов](https://python-all.ru/3.12/c-api/structures.html)116  - [Структуры объектов типов](https://python-all.ru/3.12/c-api/typeobj.html)117  - [Поддержка циклической сборки мусора](https://python-all.ru/3.12/c-api/gcsupport.html)118- [Версионирование API и ABI](https://python-all.ru/3.12/c-api/apiabiversion.html)119