Python Magic Methods – Documentation for Special Methods (__init__, __new__, __len__)

classmagic-methodspython

Where is a complete list of the special double-underscore/dunder methods that can be used in classes? (e.g., __init__, __new__, __len__, __add__)

Best Answer

Please take a look at the special method names section in the Python language reference.