← Reference

dunder-methods

Python dunder-methods reference.

__add__ / __radd__ / __iadd__

Operator overloading methods for addition in Python. Learn how to define custom addition behavior for your objects using __add__, __radd__, and __iadd__.

def __add__(self, other)