Python 語言參考手冊¶
這份參考手冊會描述 Python 語言的語法及「核心語意」。它雖然簡潔,但也盡量保持精確並完整。關於非必要的 (non-essential) 內建物件型別、內建函式及模組的語意,則在 Python 標準函式庫 (Standard Library) 中說明。關於此語言的非正式介紹,請參閱 Python 教學。對於 C 或 C++ 程式設計師,還有另外兩個手冊:擴充和嵌入 Python 直譯器以高階的視野說明如何編寫 Python 擴充模組,而 Python/C API 參考手冊則詳細說明 C/C++ 程式設計師可用的介面。
- 1. 簡介
- 2. Lexical analysis
- 3. Data model
- 4. Execution model
- 5. The import system
- 6. Expressions
- 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. Simple statements
- 7.1. Expression statements
- 7.2. Assignment statements
- 7.3. The
assert
statement - 7.4. The
pass
statement - 7.5. The
del
statement - 7.6. The
return
statement - 7.7. The
yield
statement - 7.8. The
raise
statement - 7.9. The
break
statement - 7.10. The
continue
statement - 7.11. The
import
statement - 7.12. The
global
statement - 7.13. The
nonlocal
statement - 7.14. The
type
statement
- 8. Compound statements
- 9. 最高層級元件
- 10. 完整的語法規格書