Operator Assignment¶
:= - Walrus operator
x += y
- will call method "iadd" on objectx
(x.__iadd__(y)
)x -= y
- will call method "isub" on objectx
(x.__isub__(y)
)x *= y
- will call method "imul" on objectx
(x.__imul__(y)
)x **= y
- will call method "ipow" on objectx
(x.__ipow__(y)
)x @= y
- will call method "imatmul" on objectx
(x.__imatmul__(y)
)x /= y
- will call method "itruediv" on objectx
(x.__itruediv__(y)
)x //= y
- will call method "ifloordiv" on objectx
(x.__ifloordiv__(y)
)x %= y
- will call method "imod" on objectx
(x.__imod__(y)
)
Operator |
Method |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|