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