[PYTHON] Note: List of customized special names

Python Language Reference-- 3. Data Model List of special names for customization starting with "\ _ \ _" (Search when the name of the function you want to implement does not appear)

3.3.1 Basic customization

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)

3.3.2 Customize attribute value access

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.__set_name__(self, owner, name) object.__slots__

3.3.3 Customize class generation

object.__init_subclass__(cls) object.__mro_entries__(self, bases) object.__prepare__(metacls, name, bases)

3.3.4 Instance customization and subclass checking

class.__instancecheck__(self, instance) class.__subclasscheck__(self, instance)

3.3.5 Emulate a generic type

object.__class_getitem__(cls, key)

3.3.6 Emulate a callable object

object.__call__(self[, args...])

3.3.7 Emulate a container

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)

3.3.8 Emulate a numeric type

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)

3.3.9 with statement and context manager

object.__enter__(self) object.__exit__(self, exc_type, exc_value, traceback)

3.4.1 Waitable objects

object.__await__(self)

3.4.3 Asynchronous iterator

object.__aiter__(self) object.__anext__(self)

3.4.3 Asynchronous Context Manager

object.__aenter__(self) object.__aexit__(self, exc_type, exc_value, traceback)

Recommended Posts

Note: List of customized special names
Note: List comprehension
List of python modules
Mayungo's Python Learning Note: List of stories and links
[Note] Beginning of programming
Copy of multiple List
Make a note of the list of basic Pandas usage
List of activation functions (2020)
[Python] Get the list of ExifTags names of Pillow library
[Note] Contents of shape [0], shape [1], shape [2]
Depth of nested list
note of bind mount
[Note] List of basic commands for building python / conda environment
Summary of Python3 list operations
Operation of filter (None, list)
List of nodes in diagrams
List of self-made Docker images
Multidimensional array initialization of list
[Python] Copy of multidimensional list
List of useful coding styles
I tried to get a list of AMI Names using Boto3
python note: map -do the same for each element of the list