datatypes.md
1> **Источник:** https://python-all.ru/3.1/library/datatypes.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# 8. Типы данных89Модули, описанные в этой главе, предоставляют разнообразные специализированные типы данных, такие как даты и время, массивы фиксированного типа, кучи (heap queues), синхронизированные очереди и множества.1011Python также предоставляет некоторые встроенные типы данных, в частности, [`dict`](https://python-all.ru/3.1/library/stdtypes.html#dict), [`list`](https://python-all.ru/3.1/library/functions.html#list), [`set`](https://python-all.ru/3.1/library/stdtypes.html#set) и [`frozenset`](https://python-all.ru/3.1/library/stdtypes.html#frozenset), а также [`tuple`](https://python-all.ru/3.1/library/functions.html#tuple). Класс [`str`](https://python-all.ru/3.1/library/functions.html#str) используется для хранения строк Unicode, а класс [`bytes`](https://python-all.ru/3.1/library/functions.html#bytes) – для хранения двоичных данных.1213В этой главе описаны следующие модули:1415- [8.1. `datetime` – Базовые типы даты и времени](https://python-all.ru/3.1/library/datetime.html)1617 - [8.1.1. Доступные типы](https://python-all.ru/3.1/library/datetime.html#available-types)18 - [8.1.2. `timedelta` Объекты](https://python-all.ru/3.1/library/datetime.html#timedelta-objects)19 - [8.1.3. `date` Объекты](https://python-all.ru/3.1/library/datetime.html#date-objects)20 - [8.1.4. `datetime` Объекты](https://python-all.ru/3.1/library/datetime.html#datetime-objects)21 - [8.1.5. `time` Объекты](https://python-all.ru/3.1/library/datetime.html#time-objects)22 - [8.1.6. `tzinfo` Объекты](https://python-all.ru/3.1/library/datetime.html#tzinfo-objects)23 - [8.1.7. Поведение `strftime()` и `strptime()`](https://python-all.ru/3.1/library/datetime.html#strftime-and-strptime-behavior)24- [8.2. `calendar` – Общие функции, связанные с календарём](https://python-all.ru/3.1/library/calendar.html)25- [8.3. `collections` – Типы данных-контейнеры](https://python-all.ru/3.1/library/collections.html)2627 - [8.3.1. Объекты `Counter`](https://python-all.ru/3.1/library/collections.html#counter-objects)28 - [8.3.2. Объекты `deque`](https://python-all.ru/3.1/library/collections.html#deque-objects)2930 - [8.3.2.1. Рецепты `deque`](https://python-all.ru/3.1/library/collections.html#deque-recipes)31 - [8.3.3. Объекты `defaultdict`](https://python-all.ru/3.1/library/collections.html#defaultdict-objects)3233 - [8.3.3.1. Примеры `defaultdict`](https://python-all.ru/3.1/library/collections.html#defaultdict-examples)34 - [8.3.4. `namedtuple()` Фабричная функция для кортежей с именованными полями](https://python-all.ru/3.1/library/collections.html#namedtuple-factory-function-for-tuples-with-named-fields)35 - [8.3.5. Объекты `OrderedDict`](https://python-all.ru/3.1/library/collections.html#ordereddict-objects)3637 - [8.3.5.1. Примеры и рецепты `OrderedDict`](https://python-all.ru/3.1/library/collections.html#ordereddict-examples-and-recipes)38 - [8.3.6. Объекты `UserDict`](https://python-all.ru/3.1/library/collections.html#userdict-objects)39 - [8.3.7. Объекты `UserList`](https://python-all.ru/3.1/library/collections.html#userlist-objects)40 - [8.3.8. Объекты `UserString`](https://python-all.ru/3.1/library/collections.html#userstring-objects)41 - [8.3.9. ABC – абстрактные базовые классы](https://python-all.ru/3.1/library/collections.html#abcs-abstract-base-classes)42- [8.4. `heapq` – Алгоритм пирамидальной очереди](https://python-all.ru/3.1/library/heapq.html)4344 - [8.4.1. Основные примеры](https://python-all.ru/3.1/library/heapq.html#basic-examples)45 - [8.4.2. Замечания по реализации очереди с приоритетом](https://python-all.ru/3.1/library/heapq.html#priority-queue-implementation-notes)46 - [8.4.3. Теория](https://python-all.ru/3.1/library/heapq.html#theory)47- [8.5. `bisect` – Алгоритм бисекции массива](https://python-all.ru/3.1/library/bisect.html)4849 - [8.5.1. Поиск в отсортированных списках](https://python-all.ru/3.1/library/bisect.html#searching-sorted-lists)50 - [8.5.2. Другие примеры](https://python-all.ru/3.1/library/bisect.html#other-examples)51- [8.6. `array` – Эффективные массивы числовых значений](https://python-all.ru/3.1/library/array.html)52- [8.7. `sched` – Планировщик событий](https://python-all.ru/3.1/library/sched.html)5354 - [8.7.1. Объекты планировщика](https://python-all.ru/3.1/library/sched.html#scheduler-objects)55- [8.8. `queue` – Синхронизированный класс очереди](https://python-all.ru/3.1/library/queue.html)5657 - [8.8.1. Объекты очереди](https://python-all.ru/3.1/library/queue.html#queue-objects)58- [8.9. `weakref` – Слабые ссылки](https://python-all.ru/3.1/library/weakref.html)5960 - [8.9.1. Объекты слабых ссылок](https://python-all.ru/3.1/library/weakref.html#weak-reference-objects)61 - [8.9.2. Пример](https://python-all.ru/3.1/library/weakref.html#example)62- [8.10. `types` – Имена для встроенных типов](https://python-all.ru/3.1/library/types.html)63- [8.11. `copy` – Операции поверхностного и глубокого копирования](https://python-all.ru/3.1/library/copy.html)64- [8.12. `pprint` – Красивая печать данных](https://python-all.ru/3.1/library/pprint.html)6566 - [8.12.1. Объекты PrettyPrinter](https://python-all.ru/3.1/library/pprint.html#prettyprinter-objects)67 - [8.12.2. Пример](https://python-all.ru/3.1/library/pprint.html#example)68- [8.13. `reprlib` – Альтернативная реализация `repr()`](https://python-all.ru/3.1/library/reprlib.html)6970 - [8.13.1. Объекты Repr](https://python-all.ru/3.1/library/reprlib.html#repr-objects)71 - [8.13.2. Создание подклассов Repr](https://python-all.ru/3.1/library/reprlib.html#subclassing-repr-objects)72