June 2019
Beginner to intermediate
770 pages
19h 24m
English
Reflected operators are used in the following two cases:
The following table shows the mapping between reflected special methods and operators:
|
Method |
Operator |
|
object.__radd__(self, other) |
+ |
|
object.__rsub__(self, other) |
- |
|
object.__rmul__(self, other) |
* |
|
object.__rtruediv__(self, other) |
/ |
|
object.__rfloordiv__(self, other) |
// |
|
object.__rmod__(self, ... |
Read now
Unlock full access