Skip to content

Python Type Hierarchy

Tags:

Number

  • Integral: Integer, Booleans
  • Non-Integral: Floats, Complex, Decimals, Fractions(1/3)

Collection

  • Sequences
    • Mutable: List
    • Immutable: Tuples, Strings
  • Sets
    • Mutable: Sets
    • Immutable: Frozen Sets
  • Mappings
    • Dictionaries (relate to set)

Callables

  • Built-in Functions
  • User-Defined Fuctions
  • Instance Methods (e.g. len())
  • Built-in Method (e.g. my_list.append(x))
  • Generators
  • Classes
  • Class Instances(__call__())

Singletons

  • None
  • NotImplemented
  • Elipsis operators

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *