The arithmetic operator's special methods
There are a total of 13 binary operators and their associated special methods. We'll focus on the obvious arithmetic operators first. The special method names match the operators (and functions), as shown in the following table:
Method |
Operator |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
And yes, interestingly, two functions are included with the various symbolic operators. There are a number of unary operators and functions which have special method names, shown in the following table:
Method |
Operator |
---|---|
|
|
|
|
|
|
|
|
| ... |