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

---

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

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

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

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

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

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

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

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

- [Объекты целых чисел](https://python-all.ru/3.12/c-api/long.html)
- [Объекты логических значений](https://python-all.ru/3.12/c-api/bool.html)
- [Объекты чисел с плавающей запятой](https://python-all.ru/3.12/c-api/float.html)

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

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

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

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

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

- [Объекты bytes](https://python-all.ru/3.12/c-api/bytes.html)
- [Объекты массива байтов](https://python-all.ru/3.12/c-api/bytearray.html)

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

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

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

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

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

- [Объекты словарей](https://python-all.ru/3.12/c-api/dict.html)
- [Множества](https://python-all.ru/3.12/c-api/set.html)

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

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

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

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

  - [Инициализация C-модулей](https://python-all.ru/3.12/c-api/module.html#initializing-c-modules)

    - [Однофазная инициализация](https://python-all.ru/3.12/c-api/module.html#single-phase-initialization)
    - [Многофазная инициализация](https://python-all.ru/3.12/c-api/module.html#multi-phase-initialization)
    - [Функции низкоуровневого создания модулей](https://python-all.ru/3.12/c-api/module.html#low-level-module-creation-functions)
    - [Вспомогательные функции](https://python-all.ru/3.12/c-api/module.html#support-functions)
  - [Поиск модуля](https://python-all.ru/3.12/c-api/module.html#module-lookup)
- [Объекты итераторов](https://python-all.ru/3.12/c-api/iterator.html)
- [Объекты дескрипторов](https://python-all.ru/3.12/c-api/descriptor.html)
- [Объекты срезов](https://python-all.ru/3.12/c-api/slice.html)

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

  - [Внутренние фреймы](https://python-all.ru/3.12/c-api/frame.html#internal-frames)
- [Объекты-генераторы](https://python-all.ru/3.12/c-api/gen.html)
- [Объекты корутин](https://python-all.ru/3.12/c-api/coro.html)
- [Объекты контекстных переменных](https://python-all.ru/3.12/c-api/contextvars.html)
- [Объекты datetime](https://python-all.ru/3.12/c-api/datetime.html)
- [Объекты для аннотации типов](https://python-all.ru/3.12/c-api/typehints.html)
