[Python >= 3.9] 型 一覧

コレクション抽象基底クラス
https://docs.python.org/ja/3/library/collections.abc.html#collections-abstract-base-classes


Python 組み込み型
https://docs.python.org/ja/3/library/stdtypes.html#built-in-types


数値型
https://docs.python.org/ja/3/library/stdtypes.html#numeric-types-int-float-complex
class numbers.Integral
class numbers.Real
    int, float, complex

ブーリアン型
https://docs.python.org/ja/3/library/stdtypes.html#boolean-type-bool
class bool
    bool

イテレータ型
https://docs.python.org/ja/3/library/stdtypes.html#iterator-types
class collections.abc.Iterator
    下記2つメソッドを実装しているものを指す。
    ・iterator.__iter__()
      https://docs.python.org/ja/3/library/stdtypes.html#container.__iter__
    ・iterator.__next__()
      https://docs.python.org/ja/3/library/stdtypes.html#iterator.__next__

シーケンス型
https://docs.python.org/ja/3/library/stdtypes.html#sequence-types-list-tuple-range
class collections.abc.Sequence 
    list, str, tuple, range, bytes, bytearray
    
    x in s      sがxを含む場合はTrue
    s[i]        インデックスで参照可能
    len(s)      長さ
    min(s)      最小の値
    max(s)      最大の値
    s.count(x)  sがxを含んでいる数

set(集合)型
https://docs.python.org/ja/3/library/stdtypes.html#set-types-set-frozenset
class collections.abc.Set
    set, frozenset

マッピング型
https://docs.python.org/ja/3/library/stdtypes.html#mapping-types-dict
class collections.abc.Mapping
    dict
    
    list(d)        キーのリスト
    len(d)         項目数
    d[key]         キーの値
    d[key] = value キーに値をセット
    key in d       dのキーがkeyを含む場合はTrue
    iter(d)        キーのイテレータ
    keys()         キーのビュー
    values()       値のビュー
    items()        項目のビュー
    get(key[, default]) キーの値を取得。存在しない場合はdefaultを返す
    
    ビュー
    https://docs.python.org/ja/3/library/stdtypes.html#dictionary-view-objects

イテラブル
class collections.abc.Iterable
    シーケンス型, マッピング型, ファイルオブジェクト

コンテキストマネージャ型
https://docs.python.org/ja/3/library/stdtypes.html#context-manager-types

型アノテーション型
https://docs.python.org/ja/3/library/stdtypes.html#type-annotation-types-generic-alias-union
    ジェネリックエイリアス型, ユニオン型

    ジェネリックエイリアス型
    https://docs.python.org/ja/3/library/stdtypes.html#generic-alias-type

        標準ジェネリッククラス
        https://docs.python.org/ja/3/library/stdtypes.html#standard-generic-classes

    ユニオン型
    https://docs.python.org/ja/3/library/stdtypes.html#union-type