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

index.md

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

1> **Источник:** https://python-all.ru/3.9/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.9/extending/index.html#extending-index), в котором описаны общие принципы написания расширений, но нет подробной документации по функциям API.1011- [Введение](https://python-all.ru/3.9/c-api/intro.html)1213  - [Стандарты кодирования](https://python-all.ru/3.9/c-api/intro.html#coding-standards)14  - [Заголовочные файлы](https://python-all.ru/3.9/c-api/intro.html#include-files)15  - [Полезные макросы](https://python-all.ru/3.9/c-api/intro.html#useful-macros)16  - [Объекты, типы и счетчики ссылок](https://python-all.ru/3.9/c-api/intro.html#objects-types-and-reference-counts)17  - [Исключения](https://python-all.ru/3.9/c-api/intro.html#exceptions)18  - [Встраивание Python](https://python-all.ru/3.9/c-api/intro.html#embedding-python)19  - [Отладочные сборки](https://python-all.ru/3.9/c-api/intro.html#debugging-builds)20- [Стабильный ABI](https://python-all.ru/3.9/c-api/stable.html)21- [Очень высокоуровневый слой](https://python-all.ru/3.9/c-api/veryhigh.html)22- [Подсчёт ссылок](https://python-all.ru/3.9/c-api/refcounting.html)23- [Обработка исключений](https://python-all.ru/3.9/c-api/exceptions.html)2425  - [Вывод и очистка](https://python-all.ru/3.9/c-api/exceptions.html#printing-and-clearing)26  - [Возбуждение исключений](https://python-all.ru/3.9/c-api/exceptions.html#raising-exceptions)27  - [Выдача предупреждений](https://python-all.ru/3.9/c-api/exceptions.html#issuing-warnings)28  - [Запрос индикатора ошибки](https://python-all.ru/3.9/c-api/exceptions.html#querying-the-error-indicator)29  - [Обработка сигналов](https://python-all.ru/3.9/c-api/exceptions.html#signal-handling)30  - [Классы исключений](https://python-all.ru/3.9/c-api/exceptions.html#exception-classes)31  - [Объекты исключений](https://python-all.ru/3.9/c-api/exceptions.html#exception-objects)32  - [Объекты исключений Unicode](https://python-all.ru/3.9/c-api/exceptions.html#unicode-exception-objects)33  - [Управление рекурсией](https://python-all.ru/3.9/c-api/exceptions.html#recursion-control)34  - [Стандартные исключения](https://python-all.ru/3.9/c-api/exceptions.html#standard-exceptions)35  - [Стандартные категории предупреждений](https://python-all.ru/3.9/c-api/exceptions.html#standard-warning-categories)36- [Утилиты](https://python-all.ru/3.9/c-api/utilities.html)3738  - [Утилиты операционной системы](https://python-all.ru/3.9/c-api/sys.html)39  - [Системные функции](https://python-all.ru/3.9/c-api/sys.html#system-functions)40  - [Управление процессами](https://python-all.ru/3.9/c-api/sys.html#process-control)41  - [Импорт модулей](https://python-all.ru/3.9/c-api/import.html)42  - [Поддержка маршалинга данных](https://python-all.ru/3.9/c-api/marshal.html)43  - [Разбор аргументов и сборка значений](https://python-all.ru/3.9/c-api/arg.html)44  - [Преобразование и форматирование строк](https://python-all.ru/3.9/c-api/conversion.html)45  - [Рефлексия](https://python-all.ru/3.9/c-api/reflection.html)46  - [Реестр кодировок и вспомогательные функции](https://python-all.ru/3.9/c-api/codec.html)47- [Слой абстрактных объектов](https://python-all.ru/3.9/c-api/abstract.html)4849  - [Протокол объекта](https://python-all.ru/3.9/c-api/object.html)50  - [Протокол вызова](https://python-all.ru/3.9/c-api/call.html)51  - [Протокол чисел](https://python-all.ru/3.9/c-api/number.html)52  - [Протокол последовательностей](https://python-all.ru/3.9/c-api/sequence.html)53  - [Протокол отображений](https://python-all.ru/3.9/c-api/mapping.html)54  - [Протокол итератора](https://python-all.ru/3.9/c-api/iter.html)55  - [Протокол буфера](https://python-all.ru/3.9/c-api/buffer.html)56  - [Старый буферный протокол](https://python-all.ru/3.9/c-api/objbuffer.html)57- [Слой конкретных объектов](https://python-all.ru/3.9/c-api/concrete.html)5859  - [Базовые объекты](https://python-all.ru/3.9/c-api/concrete.html#fundamental-objects)60  - [Числовые объекты](https://python-all.ru/3.9/c-api/concrete.html#numeric-objects)61  - [Объекты последовательностей](https://python-all.ru/3.9/c-api/concrete.html#sequence-objects)62  - [Объекты контейнеров](https://python-all.ru/3.9/c-api/concrete.html#container-objects)63  - [Объекты функций](https://python-all.ru/3.9/c-api/concrete.html#function-objects)64  - [Прочие объекты](https://python-all.ru/3.9/c-api/concrete.html#other-objects)65- [Инициализация, финализация и потоки](https://python-all.ru/3.9/c-api/init.html)6667  - [Перед инициализацией Python](https://python-all.ru/3.9/c-api/init.html#before-python-initialization)68  - [Глобальные переменные конфигурации](https://python-all.ru/3.9/c-api/init.html#global-configuration-variables)69  - [Инициализация и финализация интерпретатора](https://python-all.ru/3.9/c-api/init.html#initializing-and-finalizing-the-interpreter)70  - [Параметры уровня процесса](https://python-all.ru/3.9/c-api/init.html#process-wide-parameters)71  - [Состояние потока и глобальная блокировка интерпретатора](https://python-all.ru/3.9/c-api/init.html#thread-state-and-the-global-interpreter-lock)72  - [Поддержка под-интерпретаторов](https://python-all.ru/3.9/c-api/init.html#sub-interpreter-support)73  - [Асинхронные уведомления](https://python-all.ru/3.9/c-api/init.html#asynchronous-notifications)74  - [Профилирование и трассировка](https://python-all.ru/3.9/c-api/init.html#profiling-and-tracing)75  - [Расширенная поддержка отладчика](https://python-all.ru/3.9/c-api/init.html#advanced-debugger-support)76  - [Поддержка локального хранилища потоков](https://python-all.ru/3.9/c-api/init.html#thread-local-storage-support)77- [Конфигурация инициализации Python](https://python-all.ru/3.9/c-api/init_config.html)7879  - [PyWideStringList](https://python-all.ru/3.9/c-api/init_config.html#pywidestringlist)80  - [PyStatus](https://python-all.ru/3.9/c-api/init_config.html#pystatus)81  - [PyPreConfig](https://python-all.ru/3.9/c-api/init_config.html#pypreconfig)82  - [Преинициализация с PyPreConfig](https://python-all.ru/3.9/c-api/init_config.html#preinitialization-with-pypreconfig)83  - [PyConfig](https://python-all.ru/3.9/c-api/init_config.html#pyconfig)84  - [Инициализация с помощью PyConfig](https://python-all.ru/3.9/c-api/init_config.html#initialization-with-pyconfig)85  - [Изолированная конфигурация](https://python-all.ru/3.9/c-api/init_config.html#isolated-configuration)86  - [Конфигурация Python](https://python-all.ru/3.9/c-api/init_config.html#python-configuration)87  - [Конфигурация путей](https://python-all.ru/3.9/c-api/init_config.html#path-configuration)88  - [Py\_RunMain()](https://python-all.ru/3.9/c-api/init_config.html#py-runmain)89  - [Py\_GetArgcArgv()](https://python-all.ru/3.9/c-api/init_config.html#py-getargcargv)90  - [Приватный предварительный API многофазной инициализации](https://python-all.ru/3.9/c-api/init_config.html#multi-phase-initialization-private-provisional-api)91- [Управление памятью](https://python-all.ru/3.9/c-api/memory.html)9293  - [Обзор](https://python-all.ru/3.9/c-api/memory.html#overview)94  - [Интерфейс низкоуровневой памяти](https://python-all.ru/3.9/c-api/memory.html#raw-memory-interface)95  - [Интерфейс памяти](https://python-all.ru/3.9/c-api/memory.html#memory-interface)96  - [Аллокаторы объектов](https://python-all.ru/3.9/c-api/memory.html#object-allocators)97  - [Аллокаторы памяти по умолчанию](https://python-all.ru/3.9/c-api/memory.html#default-memory-allocators)98  - [Настройка аллокаторов памяти](https://python-all.ru/3.9/c-api/memory.html#customize-memory-allocators)99  - [Аллокатор pymalloc](https://python-all.ru/3.9/c-api/memory.html#the-pymalloc-allocator)100  - [C API модуля tracemalloc](https://python-all.ru/3.9/c-api/memory.html#tracemalloc-c-api)101  - [Примеры](https://python-all.ru/3.9/c-api/memory.html#examples)102- [Поддержка реализации объектов](https://python-all.ru/3.9/c-api/objimpl.html)103104  - [Выделение объектов в куче](https://python-all.ru/3.9/c-api/allocation.html)105  - [Общие структуры объектов](https://python-all.ru/3.9/c-api/structures.html)106  - [Объекты типов](https://python-all.ru/3.9/c-api/typeobj.html)107  - [Структуры числовых объектов](https://python-all.ru/3.9/c-api/typeobj.html#number-object-structures)108  - [Структуры объектов отображений](https://python-all.ru/3.9/c-api/typeobj.html#mapping-object-structures)109  - [Структуры объектов последовательностей](https://python-all.ru/3.9/c-api/typeobj.html#sequence-object-structures)110  - [Структуры буферных объектов](https://python-all.ru/3.9/c-api/typeobj.html#buffer-object-structures)111  - [Структуры асинхронных объектов](https://python-all.ru/3.9/c-api/typeobj.html#async-object-structures)112  - [typedefs типов слотов](https://python-all.ru/3.9/c-api/typeobj.html#slot-type-typedefs)113  - [Примеры](https://python-all.ru/3.9/c-api/typeobj.html#examples)114  - [Поддержка циклической сборки мусора](https://python-all.ru/3.9/c-api/gcsupport.html)115- [Версионирование API и ABI](https://python-all.ru/3.9/c-api/apiabiversion.html)116