Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Operator Magic method
+ __add__(self,other)
- __sub__(self,other)
* __mul__(self,other)
@ __matmul__(self,other)
/ __truediv__(self,other)
// __floordiv__(self,other)
% __mod__(self,other)
divmod() __divmod__(self,other)
** __pow__(self,other)
<< __lshift__(self,other)
>> __rshift__(self, other)
& __and__(self, other)
^ __xor__(self, other)
| __or__(self, other)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment