> **Источник:** https://python-all.ru/3.15/c-api/concrete.html
>
> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.

---

# Слой конкретных объектов

Функции из этой главы относятся к определённым типам объектов Python. Передача им объекта неправильного типа не рекомендуется; если объект получен из программы на Python и нет уверенности, что он имеет правильный тип, необходимо сначала выполнить проверку типа; например, чтобы проверить, является ли объект словарём, используйте [`PyDict_Check()`](https://python-all.ru/3.15/c-api/dict.html#c.PyDict_Check). Глава построена по принципу «родословного дерева» типов объектов Python.

> **Предупреждение**
>
> Хотя функции, описанные в этой главе, тщательно проверяют тип передаваемых объектов, многие из них не проверяют, не передан ли `NULL` вместо допустимого объекта. Допуск `NULL` может привести к нарушениям доступа к памяти и немедленному завершению интерпретатора.

## Фундаментальные объекты

В этом разделе описаны объекты типов Python и синглтон `None`.

- [Объекты типов](https://python-all.ru/3.15/c-api/type.html)

  - [Создание типов, размещаемых в куче](https://python-all.ru/3.15/c-api/type.html#creating-heap-allocated-types)

    - [Идентификаторы слотов типов](https://python-all.ru/3.15/c-api/type.html#type-slot-ids)
  - [Частично устаревший API](https://python-all.ru/3.15/c-api/type.html#soft-deprecated-api)
- [Объект `None`](https://python-all.ru/3.15/c-api/none.html)

## Числовые объекты

- [Объекты целых чисел](https://python-all.ru/3.15/c-api/long.html)

  - [Экспортный API](https://python-all.ru/3.15/c-api/long.html#export-api)
  - [PyLongWriter API](https://python-all.ru/3.15/c-api/long.html#pylongwriter-api)
  - [Устаревший API](https://python-all.ru/3.15/c-api/long.html#deprecated-api)
- [Объекты логических значений](https://python-all.ru/3.15/c-api/bool.html)
- [Объекты чисел с плавающей запятой](https://python-all.ru/3.15/c-api/float.html)

  - [Функции упаковки и распаковки](https://python-all.ru/3.15/c-api/float.html#pack-and-unpack-functions)

    - [Функции упаковки](https://python-all.ru/3.15/c-api/float.html#pack-functions)
    - [Функции распаковки](https://python-all.ru/3.15/c-api/float.html#unpack-functions)
- [Объекты комплексных чисел](https://python-all.ru/3.15/c-api/complex.html)

  - [Комплексные числа как структуры C](https://python-all.ru/3.15/c-api/complex.html#complex-numbers-as-c-structures)

## Объекты последовательностей

Общие операции над объектами последовательностей были рассмотрены в предыдущей главе; в этом разделе рассматриваются конкретные виды объектов последовательностей, встроенные в язык Python.

- [Объекты bytes](https://python-all.ru/3.15/c-api/bytes.html)
- [PyBytesWriter](https://python-all.ru/3.15/c-api/bytes.html#pybyteswriter)

  - [Создание, завершение, отбрасывание](https://python-all.ru/3.15/c-api/bytes.html#create-finish-discard)
  - [Высокоуровневый API](https://python-all.ru/3.15/c-api/bytes.html#high-level-api)
  - [Геттеры](https://python-all.ru/3.15/c-api/bytes.html#getters)
  - [Низкоуровневый API](https://python-all.ru/3.15/c-api/bytes.html#low-level-api)
- [Объекты массива байтов](https://python-all.ru/3.15/c-api/bytearray.html)

  - [Макросы проверки типа](https://python-all.ru/3.15/c-api/bytearray.html#type-check-macros)
  - [Функции прямого API](https://python-all.ru/3.15/c-api/bytearray.html#direct-api-functions)
  - [Макросы](https://python-all.ru/3.15/c-api/bytearray.html#macros)
- [Объекты Unicode и кодеки](https://python-all.ru/3.15/c-api/unicode.html)

  - [Объекты Unicode](https://python-all.ru/3.15/c-api/unicode.html#unicode-objects)

    - [Тип Юникода](https://python-all.ru/3.15/c-api/unicode.html#unicode-type)
    - [Свойства символов Юникода](https://python-all.ru/3.15/c-api/unicode.html#unicode-character-properties)
    - [Создание и доступ к строкам Юникода](https://python-all.ru/3.15/c-api/unicode.html#creating-and-accessing-unicode-strings)
    - [Локальная кодировка](https://python-all.ru/3.15/c-api/unicode.html#locale-encoding)
    - [Кодировка файловой системы](https://python-all.ru/3.15/c-api/unicode.html#file-system-encoding)
    - [Поддержка wchar\_t](https://python-all.ru/3.15/c-api/unicode.html#wchar-t-support)
  - [Встроенные кодеки](https://python-all.ru/3.15/c-api/unicode.html#built-in-codecs)

    - [Общие кодеки](https://python-all.ru/3.15/c-api/unicode.html#generic-codecs)
    - [Кодеки UTF-8](https://python-all.ru/3.15/c-api/unicode.html#utf-8-codecs)
    - [Кодеки UTF-32](https://python-all.ru/3.15/c-api/unicode.html#utf-32-codecs)
    - [Кодеки UTF-16](https://python-all.ru/3.15/c-api/unicode.html#utf-16-codecs)
    - [Кодеки UTF-7](https://python-all.ru/3.15/c-api/unicode.html#utf-7-codecs)
    - [Кодеки Unicode-Escape](https://python-all.ru/3.15/c-api/unicode.html#unicode-escape-codecs)
    - [Кодеки Raw-Unicode-Escape](https://python-all.ru/3.15/c-api/unicode.html#raw-unicode-escape-codecs)
    - [Кодеки Latin-1](https://python-all.ru/3.15/c-api/unicode.html#latin-1-codecs)
    - [Кодеки ASCII](https://python-all.ru/3.15/c-api/unicode.html#ascii-codecs)
    - [Кодеки символьной карты](https://python-all.ru/3.15/c-api/unicode.html#character-map-codecs)
    - [Кодеки MBCS для Windows](https://python-all.ru/3.15/c-api/unicode.html#mbcs-codecs-for-windows)
  - [Методы и слот-функции](https://python-all.ru/3.15/c-api/unicode.html#methods-and-slot-functions)
  - [PyUnicodeWriter](https://python-all.ru/3.15/c-api/unicode.html#pyunicodewriter)
  - [Устаревший API](https://python-all.ru/3.15/c-api/unicode.html#deprecated-api)
- [Кортежи](https://python-all.ru/3.15/c-api/tuple.html)
- [Объекты структурных последовательностей](https://python-all.ru/3.15/c-api/tuple.html#struct-sequence-objects)
- [Списки](https://python-all.ru/3.15/c-api/list.html)

## Объекты-контейнеры

- [Словари](https://python-all.ru/3.15/c-api/dict.html)

  - [Объекты представлений словаря](https://python-all.ru/3.15/c-api/dict.html#dictionary-view-objects)
  - [Объекты замороженных словарей](https://python-all.ru/3.15/c-api/dict.html#frozen-dictionary-objects)
  - [Упорядоченные словари](https://python-all.ru/3.15/c-api/dict.html#ordered-dictionaries)
- [Множества](https://python-all.ru/3.15/c-api/set.html)

  - [Устаревший API](https://python-all.ru/3.15/c-api/set.html#deprecated-api)

## Объекты функций

- [Объекты функций](https://python-all.ru/3.15/c-api/function.html)
- [Объекты методов экземпляра](https://python-all.ru/3.15/c-api/method.html)
- [Объекты методов](https://python-all.ru/3.15/c-api/method.html#method-objects)
- [Объекты ячеек](https://python-all.ru/3.15/c-api/cell.html)
- [Объекты кода](https://python-all.ru/3.15/c-api/code.html)
- [Флаги объектов кода](https://python-all.ru/3.15/c-api/code.html#code-object-flags)
- [Дополнительная информация](https://python-all.ru/3.15/c-api/code.html#extra-information)

## Другие объекты

- [Объекты файлов](https://python-all.ru/3.15/c-api/file.html)

  - [Частично устаревший API](https://python-all.ru/3.15/c-api/file.html#soft-deprecated-api)
- [Объекты модулей](https://python-all.ru/3.15/c-api/module.html)

  - [Определение модуля](https://python-all.ru/3.15/c-api/module.html#module-definition)

    - [Слоты метаданных](https://python-all.ru/3.15/c-api/module.html#metadata-slots)
    - [Слоты возможностей](https://python-all.ru/3.15/c-api/module.html#feature-slots)
    - [Слоты создания и инициализации](https://python-all.ru/3.15/c-api/module.html#creation-and-initialization-slots)
  - [Состояние модуля](https://python-all.ru/3.15/c-api/module.html#module-state)

    - [Слоты для определения состояния модуля](https://python-all.ru/3.15/c-api/module.html#slots-for-defining-module-state)
    - [Токен модуля](https://python-all.ru/3.15/c-api/module.html#module-token)
  - [Динамическое создание модулей расширения](https://python-all.ru/3.15/c-api/module.html#creating-extension-modules-dynamically)
  - [Структура определения модуля](https://python-all.ru/3.15/c-api/module.html#module-definition-struct)
  - [Вспомогательные функции](https://python-all.ru/3.15/c-api/module.html#support-functions)

    - [Поиск модуля (однофазовая инициализация)](https://python-all.ru/3.15/c-api/module.html#module-lookup-single-phase-initialization)
- [Объекты итераторов](https://python-all.ru/3.15/c-api/iterator.html)

  - [Объекты range](https://python-all.ru/3.15/c-api/iterator.html#range-objects)
  - [Встроенные типы итераторов](https://python-all.ru/3.15/c-api/iterator.html#builtin-iterator-types)
  - [Прочие объекты итераторов](https://python-all.ru/3.15/c-api/iterator.html#other-iterator-objects)
- [Объекты дескрипторов](https://python-all.ru/3.15/c-api/descriptor.html)

  - [Встроенные дескрипторы](https://python-all.ru/3.15/c-api/descriptor.html#built-in-descriptors)
- [Объекты срезов](https://python-all.ru/3.15/c-api/slice.html)

  - [Объект Ellipsis](https://python-all.ru/3.15/c-api/slice.html#ellipsis-object)
- [Объекты memoryview](https://python-all.ru/3.15/c-api/memoryview.html)
- [Объекты буфера pickle](https://python-all.ru/3.15/c-api/picklebuffer.html)
- [Объекты слабых ссылок](https://python-all.ru/3.15/c-api/weakref.html)
- [Капсулы](https://python-all.ru/3.15/c-api/capsule.html)
- [Сторожевые объекты](https://python-all.ru/3.15/c-api/sentinel.html)
- [Объекты фреймов](https://python-all.ru/3.15/c-api/frame.html)

  - [Прокси локальных переменных фрейма](https://python-all.ru/3.15/c-api/frame.html#frame-locals-proxies)
  - [Устаревшие API для локальных переменных](https://python-all.ru/3.15/c-api/frame.html#legacy-local-variable-apis)
  - [Внутренние фреймы](https://python-all.ru/3.15/c-api/frame.html#internal-frames)
- [Объекты-генераторы](https://python-all.ru/3.15/c-api/gen.html)

  - [Объекты асинхронных генераторов](https://python-all.ru/3.15/c-api/gen.html#asynchronous-generator-objects)
  - [Устаревший API](https://python-all.ru/3.15/c-api/gen.html#deprecated-api)
- [Объекты корутин](https://python-all.ru/3.15/c-api/coro.html)
- [Объекты контекстных переменных](https://python-all.ru/3.15/c-api/contextvars.html)
- [Объекты для аннотации типов](https://python-all.ru/3.15/c-api/typehints.html)

## C API для модулей расширения

- [C API библиотеки curses](https://python-all.ru/3.15/c-api/curses.html)
- [Внутренние данные](https://python-all.ru/3.15/c-api/curses.html#internal-data)
- [Объекты datetime](https://python-all.ru/3.15/c-api/datetime.html)
- [Внутренние данные](https://python-all.ru/3.15/c-api/datetime.html#internal-data)
