Python logo

上個主題

sys.path 模組搜尋路徑的初始化

下個主題

ast --- 抽象語法樹 (Abstract Syntax Trees)

此頁面

  • 回報錯誤
  • 顯示原始碼

導航

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.13.7 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • Python 語言服務
  • |
  • |

Python 語言服務¶

Python 提供了許多模組來協助處理 Python 語言。這些模組支援標記化、剖析、語法分析、位元組碼反組譯,以及其他各種設施。

這些模組包括:

  • ast --- 抽象語法樹 (Abstract Syntax Trees)
    • 抽象文法 (Abstract Grammar)
    • 節點 (Node) 類別
      • 根節點
      • 文本 (Literals)
      • 變數
      • 運算式
        • 下標 (Subscripting)
        • 綜合運算式 (comprehensions)
      • 陳述式
        • 引入 (imports)
      • 流程控制
      • 模式匹配 (pattern matching)
      • Type annotations
      • 型別參數 (type parameters)
      • 函式和類別定義
      • async 和 await
    • ast 輔助程式
    • 編譯器旗標
    • 命令列用法
  • symtable --- 存取編譯器的符號表
    • 產生符號表
    • 檢查符號表
    • 命令列用法
  • token --- 與 Python 剖析樹一起使用的常數
  • keyword --- 檢驗 Python 關鍵字
  • tokenize --- Tokenizer for Python source
    • Tokenizing Input
    • Command-Line Usage
    • 範例
  • tabnanny --- 偵測不良縮排
  • pyclbr --- Python 模組瀏覽器支援
    • 函式物件
    • 類別物件
  • py_compile — 編譯 Python 來源檔案
    • 命令列介面
  • compileall --- 位元組編譯 Python 函式庫
    • Command-line use
    • Public functions
  • dis --- Python bytecode 的反組譯器
    • 命令列介面
    • Bytecode analysis
    • 分析函式
    • Python 位元組碼指令
    • Opcode collections
  • pickletools --- pickle 開發者的工具
    • 命令列用法
      • 命令列選項
    • 程式化介面

上個主題

sys.path 模組搜尋路徑的初始化

下個主題

ast --- 抽象語法樹 (Abstract Syntax Trees)

此頁面

  • 回報錯誤
  • 顯示原始碼
«

導航

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.13.7 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • Python 語言服務
  • |
  • |
© 版權所有 2001-2025, Python Software Foundation.
此頁面採用 Python 軟體基金會授權條款第 2 版。
文件中的範例、應用技巧與其他程式碼額外採用了 Zero Clause BSD 授權條款。
更多訊息請見歷史與授權條款。

Python 軟體基金會是一家非營利法人。 敬請捐贈。

最後更新於 9月 23, 2025 (07:54 UTC)。 發現 bug?
以 Sphinx8.2.3建立。