March 2003
Intermediate to advanced
656 pages
39h 30m
English
__add__, __div__, __floordiv__, __mod__, __mul__, __sub__,__truediv__
__add__(self,other) __div__(self,other) __floordiv__(self,other) __mod__(self,other) __mul__(self,other) __sub__(self,other) __truediv__(self,other)
Operators
x
+
y,
x
/
y,
x
//
y,
x
%
y,
x
*
y,
x
-
y,
and x/y,
respectively, call these methods. The operator /
calls __truediv__, if present, instead of
__div__, in the situations where division is
non-truncating, as covered in Section 4.5.2.