Python logo

目錄

  • 3. 資料模型
    • 3.1. 物件、數值和型別
    • 3.2. 標準型別階層
      • 3.2.1. None
      • 3.2.2. NotImplemented
      • 3.2.3. Ellipsis
      • 3.2.4. numbers.Number
        • 3.2.4.1. numbers.Integral
        • 3.2.4.2. numbers.Real (float)
        • 3.2.4.3. numbers.Complex (complex)
      • 3.2.5. Sequences
        • 3.2.5.1. Immutable sequences
        • 3.2.5.2. 可變序列
      • 3.2.6. Set(集合)型別
      • 3.2.7. 對映
        • 3.2.7.1. 字典
      • 3.2.8. 可呼叫型別
        • 3.2.8.1. 自訂函式
          • 3.2.8.1.1. 特殊唯讀屬性
          • 3.2.8.1.2. 特殊可寫屬性
        • 3.2.8.2. 實例方法
        • 3.2.8.3. 產生器函式
        • 3.2.8.4. Coroutine(協程)函式
        • 3.2.8.5. 非同步產生器函式
        • 3.2.8.6. 內建函式
        • 3.2.8.7. 內建方法
        • 3.2.8.8. Classes
        • 3.2.8.9. 類別實例
      • 3.2.9. 模組
        • 3.2.9.1. Import-related attributes on module objects
        • 3.2.9.2. 模組物件的其他可寫入屬性
        • 3.2.9.3. 模組字典
      • 3.2.10. Custom classes
        • 3.2.10.1. 特殊屬性
        • 3.2.10.2. 特殊方法
      • 3.2.11. 類別實例
        • 3.2.11.1. 特殊屬性
      • 3.2.12. I/O objects (also known as file objects)
      • 3.2.13. Internal types
        • 3.2.13.1. 程式碼物件
          • 3.2.13.1.1. 特殊唯讀屬性
          • 3.2.13.1.2. 用於程式碼物件的方法
        • 3.2.13.2. Frame objects
          • 3.2.13.2.1. 特殊唯讀屬性
          • 3.2.13.2.2. 特殊可寫屬性
          • 3.2.13.2.3. Frame object methods
        • 3.2.13.3. Traceback objects
        • 3.2.13.4. Slice objects
        • 3.2.13.5. Static method objects
        • 3.2.13.6. Class method objects
    • 3.3. Special method names
      • 3.3.1. Basic customization
      • 3.3.2. Customizing attribute access
        • 3.3.2.1. Customizing module attribute access
        • 3.3.2.2. 實作描述器
        • 3.3.2.3. Invoking Descriptors
        • 3.3.2.4. __slots__
      • 3.3.3. Customizing class creation
        • 3.3.3.1. Metaclasses
        • 3.3.3.2. Resolving MRO entries
        • 3.3.3.3. Determining the appropriate metaclass
        • 3.3.3.4. Preparing the class namespace
        • 3.3.3.5. Executing the class body
        • 3.3.3.6. Creating the class object
        • 3.3.3.7. Uses for metaclasses
      • 3.3.4. Customizing instance and subclass checks
      • 3.3.5. Emulating generic types
        • 3.3.5.1. The purpose of __class_getitem__
        • 3.3.5.2. __class_getitem__ versus __getitem__
      • 3.3.6. Emulating callable objects
      • 3.3.7. Emulating container types
      • 3.3.8. Emulating numeric types
      • 3.3.9. With 陳述式的情境管理器
      • 3.3.10. Customizing positional arguments in class pattern matching
      • 3.3.11. Emulating buffer types
      • 3.3.12. Annotations
      • 3.3.13. Special method lookup
    • 3.4. 協程
      • 3.4.1. Awaitable Objects
      • 3.4.2. 協程物件
      • 3.4.3. Asynchronous Iterators
      • 3.4.4. Asynchronous Context Managers

上個主題

2. 詞法分析

下個主題

4. 執行模型

此頁面

  • 回報錯誤
  • 改進此頁面
  • 顯示原始碼
  • 顯示翻譯原始碼

導航

  • 索引