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