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

index.md

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

1> **Источник:** https://python-all.ru/3.6/reference/index.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Справочник по языку Python89Данное справочное руководство описывает синтаксис и «основную семантику» языка. Оно краткое, но стремится к точности и полноте. Семантика необязательных встроенных типов объектов, а также встроенных функций и модулей описана в [Стандартной библиотеке Python](https://python-all.ru/3.6/library/index.html#library-index). Неформальное введение в язык можно найти в [Учебнике Python](https://python-all.ru/3.6/tutorial/index.html#tutorial-index). Для программистов на C или C++ существуют два дополнительных руководства: [«Расширение и встраивание интерпретатора Python»](https://python-all.ru/3.6/extending/index.html#extending-index) описывает общую картину написания модулей расширения Python, а [Справочное руководство по Python/C API](https://python-all.ru/3.6/c-api/index.html#c-api-index) подробно описывает интерфейсы, доступные программистам на C/C++.1011- [1. Введение](https://python-all.ru/3.6/reference/introduction.html)1213  - [1.1. Альтернативные реализации](https://python-all.ru/3.6/reference/introduction.html#alternate-implementations)14  - [1.2. Обозначения](https://python-all.ru/3.6/reference/introduction.html#notation)15- [2. Лексический анализ](https://python-all.ru/3.6/reference/lexical_analysis.html)1617  - [2.1. Структура строк](https://python-all.ru/3.6/reference/lexical_analysis.html#line-structure)18  - [2.2. Другие токены](https://python-all.ru/3.6/reference/lexical_analysis.html#other-tokens)19  - [2.3. Идентификаторы и ключевые слова](https://python-all.ru/3.6/reference/lexical_analysis.html#identifiers)20  - [2.4. Литералы](https://python-all.ru/3.6/reference/lexical_analysis.html#literals)21  - [2.5. Операторы](https://python-all.ru/3.6/reference/lexical_analysis.html#operators)22  - [2.6. Разделители](https://python-all.ru/3.6/reference/lexical_analysis.html#delimiters)23- [3. Модель данных](https://python-all.ru/3.6/reference/datamodel.html)2425  - [3.1. Объекты, значения и типы](https://python-all.ru/3.6/reference/datamodel.html#objects-values-and-types)26  - [3.2. Стандартная иерархия типов](https://python-all.ru/3.6/reference/datamodel.html#the-standard-type-hierarchy)27  - [3.3. Имена специальных методов](https://python-all.ru/3.6/reference/datamodel.html#special-method-names)28  - [3.4. Корутины](https://python-all.ru/3.6/reference/datamodel.html#coroutines)29- [4. Модель выполнения](https://python-all.ru/3.6/reference/executionmodel.html)3031  - [4.1. Структура программы](https://python-all.ru/3.6/reference/executionmodel.html#structure-of-a-program)32  - [4.2. Имена и связывание](https://python-all.ru/3.6/reference/executionmodel.html#naming-and-binding)33  - [4.3. Исключения](https://python-all.ru/3.6/reference/executionmodel.html#exceptions)34- [5. Система импорта](https://python-all.ru/3.6/reference/import.html)3536  - [5.1. `importlib`](https://python-all.ru/3.6/reference/import.html#importlib)37  - [5.2. Пакеты](https://python-all.ru/3.6/reference/import.html#packages)38  - [5.3. Поиск](https://python-all.ru/3.6/reference/import.html#searching)39  - [5.4. Загрузка](https://python-all.ru/3.6/reference/import.html#loading)40  - [5.5. Искатель на основе путей](https://python-all.ru/3.6/reference/import.html#the-path-based-finder)41  - [5.6. Замена стандартной системы импорта](https://python-all.ru/3.6/reference/import.html#replacing-the-standard-import-system)42  - [5.7. Особые соображения для \_\_main\_\_](https://python-all.ru/3.6/reference/import.html#special-considerations-for-main)43  - [5.8. Открытые вопросы](https://python-all.ru/3.6/reference/import.html#open-issues)44  - [5.9. Ссылки](https://python-all.ru/3.6/reference/import.html#references)45- [6. Выражения](https://python-all.ru/3.6/reference/expressions.html)4647  - [6.1. Арифметические преобразования](https://python-all.ru/3.6/reference/expressions.html#arithmetic-conversions)48  - [6.2. Атомы](https://python-all.ru/3.6/reference/expressions.html#atoms)49  - [6.3. Первичные выражения](https://python-all.ru/3.6/reference/expressions.html#primaries)50  - [6.4. Выражение await](https://python-all.ru/3.6/reference/expressions.html#await-expression)51  - [6.5. Оператор возведения в степень](https://python-all.ru/3.6/reference/expressions.html#the-power-operator)52  - [6.6. Унарные арифметические и битовые операции](https://python-all.ru/3.6/reference/expressions.html#unary-arithmetic-and-bitwise-operations)53  - [6.7. Бинарные арифметические операции](https://python-all.ru/3.6/reference/expressions.html#binary-arithmetic-operations)54  - [6.8. Операции сдвига](https://python-all.ru/3.6/reference/expressions.html#shifting-operations)55  - [6.9. Двоичные поразрядные операции](https://python-all.ru/3.6/reference/expressions.html#binary-bitwise-operations)56  - [6.10. Сравнения](https://python-all.ru/3.6/reference/expressions.html#comparisons)57  - [6.11. Булевы операции](https://python-all.ru/3.6/reference/expressions.html#boolean-operations)58  - [6.12. Условные выражения](https://python-all.ru/3.6/reference/expressions.html#conditional-expressions)59  - [6.13. Лямбды](https://python-all.ru/3.6/reference/expressions.html#lambda)60  - [6.14. Списки выражений](https://python-all.ru/3.6/reference/expressions.html#expression-lists)61  - [6.15. Порядок вычислений](https://python-all.ru/3.6/reference/expressions.html#evaluation-order)62  - [6.16. Приоритет операторов](https://python-all.ru/3.6/reference/expressions.html#operator-precedence)63- [7. Простые инструкции](https://python-all.ru/3.6/reference/simple_stmts.html)6465  - [7.1. Инструкции-выражения](https://python-all.ru/3.6/reference/simple_stmts.html#expression-statements)66  - [7.2. Инструкции присваивания](https://python-all.ru/3.6/reference/simple_stmts.html#assignment-statements)67  - [7.3. Инструкция `assert`](https://python-all.ru/3.6/reference/simple_stmts.html#the-assert-statement)68  - [7.4. Инструкция `pass`](https://python-all.ru/3.6/reference/simple_stmts.html#the-pass-statement)69  - [7.5. Инструкция `del`](https://python-all.ru/3.6/reference/simple_stmts.html#the-del-statement)70  - [7.6. Инструкция `return`](https://python-all.ru/3.6/reference/simple_stmts.html#the-return-statement)71  - [7.7. Инструкция `yield`](https://python-all.ru/3.6/reference/simple_stmts.html#the-yield-statement)72  - [7.8. Инструкция `raise`](https://python-all.ru/3.6/reference/simple_stmts.html#the-raise-statement)73  - [7.9. Инструкция `break`](https://python-all.ru/3.6/reference/simple_stmts.html#the-break-statement)74  - [7.10. Инструкция `continue`](https://python-all.ru/3.6/reference/simple_stmts.html#the-continue-statement)75  - [7.11. Инструкция `import`](https://python-all.ru/3.6/reference/simple_stmts.html#the-import-statement)76  - [7.12. Инструкция `global`](https://python-all.ru/3.6/reference/simple_stmts.html#the-global-statement)77  - [7.13. Инструкция `nonlocal`](https://python-all.ru/3.6/reference/simple_stmts.html#the-nonlocal-statement)78- [8. Составные инструкции](https://python-all.ru/3.6/reference/compound_stmts.html)7980  - [8.1. Инструкция `if`](https://python-all.ru/3.6/reference/compound_stmts.html#the-if-statement)81  - [8.2. Инструкция `while`](https://python-all.ru/3.6/reference/compound_stmts.html#the-while-statement)82  - [8.3. Инструкция `for`](https://python-all.ru/3.6/reference/compound_stmts.html#the-for-statement)83  - [8.4. Инструкция `try`](https://python-all.ru/3.6/reference/compound_stmts.html#the-try-statement)84  - [8.5. Инструкция `with`](https://python-all.ru/3.6/reference/compound_stmts.html#the-with-statement)85  - [8.6. Определения функций](https://python-all.ru/3.6/reference/compound_stmts.html#function-definitions)86  - [8.7. Определения классов](https://python-all.ru/3.6/reference/compound_stmts.html#class-definitions)87  - [8.8. Корутины](https://python-all.ru/3.6/reference/compound_stmts.html#coroutines)88- [9. Компоненты верхнего уровня](https://python-all.ru/3.6/reference/toplevel_components.html)8990  - [9.1. Полные программы на Python](https://python-all.ru/3.6/reference/toplevel_components.html#complete-python-programs)91  - [9.2. Ввод из файла](https://python-all.ru/3.6/reference/toplevel_components.html#file-input)92  - [9.3. Интерактивный ввод](https://python-all.ru/3.6/reference/toplevel_components.html#interactive-input)93  - [9.4. Ввод выражений](https://python-all.ru/3.6/reference/toplevel_components.html#expression-input)94- [10. Полная спецификация грамматики](https://python-all.ru/3.6/reference/grammar.html)95