Python 語言參考手冊¶
This reference manual describes the syntax and core semantics of the language. It is terse, but attempts to be exact and complete.
Elsewhere, the built-in object types and functions are described in Python built-ins reference. Standard library modules are described in The Python standard library.
For an informal introduction to the language, see Python 教學. For C or C++ programmers, two additional manuals exist: 擴充和嵌入 Python 直譯器 describes the high-level picture of how to write a Python extension module, and the Python/C API 參考手冊 describes the interfaces available to C/C++ programmers in detail.
- 1. 簡介
- 2. 詞法分析
- 3. 資料模型
- 4. 執行模型
- 5. 模組引入系統
- 6. 運算式
- 6.1. Arithmetic conversions
- 6.2. Atoms
- 6.3. Primaries
- 6.4. Await expression
- 6.5. The power operator
- 6.6. Unary arithmetic and bitwise operations
- 6.7. Binary arithmetic operations
- 6.8. Shifting operations
- 6.9. Binary bitwise operations
- 6.10. Comparisons
- 6.11. Boolean operations
- 6.12. Assignment expressions
- 6.13. Conditional expressions
- 6.14. Lambdas
- 6.15. Expression lists
- 6.16. Evaluation order
- 6.17. Operator precedence
- 7. 簡單陳述式
- 8. 複合陳述式
- 9. 最高層級元件
- 10. 完整的文法規格書