index.md
1> **Источник:** https://python-all.ru/3.1/reference/index.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Справочник по языку Python89| Версия: | 3.1 |10| --- | --- |11| Дата: | 09 апреля 2012 |1213Данное справочное руководство описывает синтаксис и «основную семантику» языка. Оно краткое, но стремится к точности и полноте. Семантика необязательных встроенных типов объектов, а также встроенных функций и модулей описана в [*Стандартной библиотеке Python*](https://python-all.ru/3.1/library/index.html#library-index). Неформальное введение в язык можно найти в [*Учебнике Python*](https://python-all.ru/3.1/tutorial/index.html#tutorial-index). Для программистов на C или C++ существуют два дополнительных руководства: [*«Расширение и встраивание интерпретатора Python»*](https://python-all.ru/3.1/extending/index.html#extending-index) описывает общую картину написания модулей расширения Python, а [*Справочное руководство по Python/C API*](https://python-all.ru/3.1/c-api/index.html#c-api-index) подробно описывает интерфейсы, доступные программистам на C/C++.1415- [1. Введение](https://python-all.ru/3.1/reference/introduction.html)1617 - [1.1. Альтернативные реализации](https://python-all.ru/3.1/reference/introduction.html#alternate-implementations)18 - [1.2. Обозначения](https://python-all.ru/3.1/reference/introduction.html#notation)19- [2. Лексический анализ](https://python-all.ru/3.1/reference/lexical_analysis.html)2021 - [2.1. Структура строк](https://python-all.ru/3.1/reference/lexical_analysis.html#line-structure)22 - [2.2. Другие токены](https://python-all.ru/3.1/reference/lexical_analysis.html#other-tokens)23 - [2.3. Идентификаторы и ключевые слова](https://python-all.ru/3.1/reference/lexical_analysis.html#identifiers)24 - [2.4. Литералы](https://python-all.ru/3.1/reference/lexical_analysis.html#literals)25 - [2.5. Операторы](https://python-all.ru/3.1/reference/lexical_analysis.html#operators)26 - [2.6. Разделители](https://python-all.ru/3.1/reference/lexical_analysis.html#delimiters)27- [3. Модель данных](https://python-all.ru/3.1/reference/datamodel.html)2829 - [3.1. Объекты, значения и типы](https://python-all.ru/3.1/reference/datamodel.html#objects-values-and-types)30 - [3.2. Стандартная иерархия типов](https://python-all.ru/3.1/reference/datamodel.html#the-standard-type-hierarchy)31 - [3.3. Имена специальных методов](https://python-all.ru/3.1/reference/datamodel.html#special-method-names)32- [4. Модель выполнения](https://python-all.ru/3.1/reference/executionmodel.html)3334 - [4.1. Именование и связывание](https://python-all.ru/3.1/reference/executionmodel.html#naming-and-binding)35 - [4.2. Исключения](https://python-all.ru/3.1/reference/executionmodel.html#exceptions)36- [5. Выражения](https://python-all.ru/3.1/reference/expressions.html)3738 - [5.1. Арифметические преобразования](https://python-all.ru/3.1/reference/expressions.html#arithmetic-conversions)39 - [5.2. Атомы](https://python-all.ru/3.1/reference/expressions.html#atoms)40 - [5.3. Первичные элементы](https://python-all.ru/3.1/reference/expressions.html#primaries)41 - [5.4. Оператор возведения в степень](https://python-all.ru/3.1/reference/expressions.html#the-power-operator)42 - [5.5. Унарные арифметические и побитовые операции](https://python-all.ru/3.1/reference/expressions.html#unary-arithmetic-and-bitwise-operations)43 - [5.6. Бинарные арифметические операции](https://python-all.ru/3.1/reference/expressions.html#binary-arithmetic-operations)44 - [5.7. Операции сдвига](https://python-all.ru/3.1/reference/expressions.html#shifting-operations)45 - [5.8. Бинарные побитовые операции](https://python-all.ru/3.1/reference/expressions.html#binary-bitwise-operations)46 - [5.9. Сравнения](https://python-all.ru/3.1/reference/expressions.html#notin)47 - [5.10. Булевы операции](https://python-all.ru/3.1/reference/expressions.html#boolean-operations)48 - [5.11. Условные выражения](https://python-all.ru/3.1/reference/expressions.html#conditional-expressions)49 - [5.12. Лямбда-выражения](https://python-all.ru/3.1/reference/expressions.html#lambda)50 - [5.13. Списки выражений](https://python-all.ru/3.1/reference/expressions.html#expression-lists)51 - [5.14. Порядок вычисления](https://python-all.ru/3.1/reference/expressions.html#evaluation-order)52 - [5.15. Итоги](https://python-all.ru/3.1/reference/expressions.html#summary)53- [6. Простые инструкции](https://python-all.ru/3.1/reference/simple_stmts.html)5455 - [6.1. Инструкции-выражения](https://python-all.ru/3.1/reference/simple_stmts.html#expression-statements)56 - [6.2. Инструкции присваивания](https://python-all.ru/3.1/reference/simple_stmts.html#assignment-statements)57 - [6.3. Инструкция `assert`](https://python-all.ru/3.1/reference/simple_stmts.html#the-assert-statement)58 - [6.4. Инструкция `pass`](https://python-all.ru/3.1/reference/simple_stmts.html#the-pass-statement)59 - [6.5. Инструкция `del`](https://python-all.ru/3.1/reference/simple_stmts.html#the-del-statement)60 - [6.6. Оператор `return`](https://python-all.ru/3.1/reference/simple_stmts.html#the-return-statement)61 - [6.7. Оператор `yield`](https://python-all.ru/3.1/reference/simple_stmts.html#the-yield-statement)62 - [6.8. Оператор `raise`](https://python-all.ru/3.1/reference/simple_stmts.html#the-raise-statement)63 - [6.9. Оператор `break`](https://python-all.ru/3.1/reference/simple_stmts.html#the-break-statement)64 - [6.10. Оператор `continue`](https://python-all.ru/3.1/reference/simple_stmts.html#the-continue-statement)65 - [6.11. Оператор `import`](https://python-all.ru/3.1/reference/simple_stmts.html#the-import-statement)66 - [6.12. Оператор `global`](https://python-all.ru/3.1/reference/simple_stmts.html#the-global-statement)67 - [6.13. Оператор `nonlocal`](https://python-all.ru/3.1/reference/simple_stmts.html#the-nonlocal-statement)68- [7. Составные инструкции](https://python-all.ru/3.1/reference/compound_stmts.html)6970 - [7.1. Инструкция `if`](https://python-all.ru/3.1/reference/compound_stmts.html#the-if-statement)71 - [7.2. Инструкция `while`](https://python-all.ru/3.1/reference/compound_stmts.html#the-while-statement)72 - [7.3. Инструкция `for`](https://python-all.ru/3.1/reference/compound_stmts.html#the-for-statement)73 - [7.4. Инструкция `try`](https://python-all.ru/3.1/reference/compound_stmts.html#the-try-statement)74 - [7.5. Инструкция `with`](https://python-all.ru/3.1/reference/compound_stmts.html#the-with-statement)75 - [7.6. Определения функций](https://python-all.ru/3.1/reference/compound_stmts.html#function-definitions)76 - [7.7. Определения классов](https://python-all.ru/3.1/reference/compound_stmts.html#class-definitions)77- [8. Компоненты верхнего уровня](https://python-all.ru/3.1/reference/toplevel_components.html)7879 - [8.1. Полные программы Python](https://python-all.ru/3.1/reference/toplevel_components.html#complete-python-programs)80 - [8.2. Ввод из файла](https://python-all.ru/3.1/reference/toplevel_components.html#file-input)81 - [8.3. Интерактивный ввод](https://python-all.ru/3.1/reference/toplevel_components.html#interactive-input)82 - [8.4. Ввод выражений](https://python-all.ru/3.1/reference/toplevel_components.html#expression-input)83- [9. Полная спецификация грамматики](https://python-all.ru/3.1/reference/grammar.html)84