カスタマイズ特殊名一覧

[Python 言語リファレンス - 3. データモデル](https://docs.python.org/ja/3/reference/datamodel.html)
"\_\_" で始まるカスタマイズするための特殊名の一覧

### 基本的なカスタマイズ
object. **\_\_new\_\_** (cls, [...])
object. **\_\_init\_\_** (self, [...])
object. **\_\_del\_\_** (self)
object. **\_\_repr\_\_** (self)
object. **\_\_str\_\_** (self)
object. **\_\_bytes\_\_** (self)
object. **\_\_format\_\_** (self, fmtspec)
object. **\_\_lt\_\_** (self, other)
object. **\_\_le\_\_** (self, other)
object. **\_\_eq\_\_** (self, other)
object. **\_\_ne\_\_** (self, other)
object. **\_\_gt\_\_** (self, other)
object. **\_\_ge\_\_** (self, other)
object. **\_\_hash\_\_** (self)
object. **\_\_bool\_\_** (self)

### 属性値アクセスをカスタマイズする
object. **\_\_getattr\_\_** (self, name)
object. **\_\_getattribute\_\_** (self, name)
object. **\_\_setattr\_\_** (self, name, value)
object. **\_\_delattr\_\_** (self, name)
object. **\_\_dir\_\_** (self)

### デスクリプタの実装
object. **\_\_get\_\_** (self, instance, owner=None)
object. **\_\_set\_\_** (self, instance, value)
object. **\_\_delete\_\_** (self, instance)
object. **\_\_objclass\_\_**

### デスクリプタの呼び出し
object. **\_\_slots\_\_**

### クラス生成をカスタマイズする
object. **\_\_init_subclass\_\_** (cls)
object. **\_\_set_name\_\_** (self, owner, name)
object. **\_\_mro_entries\_\_** (self, bases)
object. **\_\_prepare\_\_** (metacls, name, bases)

### インスタンスのカスタマイズとサブクラス チェック
class. **\_\_instancecheck\_\_** (self, instance)
class. **\_\_subclasscheck\_\_** (self, instance)

### ジェネリック型をエミュレートする
object. **\_\_class_getitem\_\_** (cls, key)

### 呼び出し可能オブジェクトをエミュレートする
object. **\_\_call\_\_** (self[, args...])

### コンテナをエミュレートする
object. **\_\_len\_\_** (self)
object. **\_\_length_hint\_\_** (self)
object. **\_\_getitem\_\_** (self, key)
object. **\_\_setitem\_\_** (self, key, value)
object. **\_\_delitem\_\_** (self, key)
object. **\_\_missing\_\_** (self, key)
object. **\_\_iter\_\_** (self)
object. **\_\_reserved\_\_** (self)
object. **\_\_contains\_\_** (self, item)

### 数値型をエミュレートする
object. **\_\_add\_\_** (self, other)
object. **\_\_sub\_\_** (self, other)
object. **\_\_mul\_\_** (self, other)
object. **\_\_matmul\_\_** (self, other)
object. **\_\_truediv\_\_** (self, other)
object. **\_\_floordiv\_\_** (self, other)
object. **\_\_mod\_\_** (self, other)
object. **\_\_divmod\_\_** (self, other)
object. **\_\_pow\_\_** (self, other [,modulo])
object. **\_\_lshift\_\_** (self, other)
object. **\_\_rshift\_\_** (self, other)
object. **\_\_and\_\_** (self, other)
object. **\_\_xor\_\_** (self, other)
object. **\_\_or\_\_** (self, other)

object. **\_\_radd\_\_** (self, other)
object. **\_\_rsub\_\_** (self, other)
object. **\_\_rmul\_\_** (self, other)
object. **\_\_rmatmul\_\_** (self, other)
object. **\_\_rtruediv\_\_** (self, other)
object. **\_\_rfloordiv\_\_** (self, other)
object. **\_\_rmod\_\_** (self, other)
object. **\_\_rdivmod\_\_** (self, other)
object. **\_\_rpow\_\_** (self, other [,modulo])
object. **\_\_rlshift\_\_** (self, other)
object. **\_\_rrshift\_\_** (self, other)
object. **\_\_rand\_\_** (self, other)
object. **\_\_rxor\_\_** (self, other)
object. **\_\_ror\_\_** (self, other)

object. **\_\_iadd\_\_** (self, other)
object. **\_\_isub\_\_** (self, other)
object. **\_\_imul\_\_** (self, other)
object. **\_\_imatmul\_\_** (self, other)
object. **\_\_itruediv\_\_** (self, other)
object. **\_\_ifloordiv\_\_** (self, other)
object. **\_\_imod\_\_** (self, other)
object. **\_\_ipow\_\_** (self, other [,modulo])
object. **\_\_ilshift\_\_** (self, other)
object. **\_\_irshift\_\_** (self, other)
object. **\_\_iand\_\_** (self, other)
object. **\_\_ixor\_\_** (self, other)
object. **\_\_ior\_\_** (self, other)

object. **\_\_neg\_\_** (self)
object. **\_\_pos\_\_** (self)
object. **\_\_abs\_\_** (self)
object. **\_\_invert\_\_** (self)

object. **\_\_complex\_\_** (self)
object. **\_\_int\_\_** (self)
object. **\_\_float\_\_** (self)
object. **\_\_index\_\_** (self)

object. **\_\_round\_\_** (self [,ndigits])
object. **\_\_trunc\_\_** (self)
object. **\_\_floor\_\_** (self)
object. **\_\_ceil\_\_** (self)

### with 文とコンテキストマネージャー
object. **\_\_enter\_\_** (self)
object. **\_\_exit\_\_** (self, exc_type, exc_value, traceback)

### クラスパターンマッチの位置引数のカスタマイズ
object. **\_\_match_args\_\_**

### buffer型のエミュレート
object. **\_\_buffer\_\_** (self, flags)
object. **\_\_release_buffer\_\_** (self, buffer)

### 待機可能オブジェクト
object. **\_\_await\_\_** (self)

### 非同期イテレータ
object. **\_\_aiter\_\_** (self)
object. **\_\_anext\_\_** (self)

### 非同期コンテキストマネージャー
object. **\_\_aenter\_\_** (self)
object. **\_\_aexit\_\_** (self, exc_type, exc_value, traceback)

---

実装したい機能の名前が出てこないとき（例えるなら、面識があって、名前も知っているハズなのに、その相手の名前がでてこない、あの感じ）のための一覧。