Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Last active July 3, 2020 05:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IndhumathyChelliah/f88c926fdc19f4d338889ceca1b1bdb3 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/f88c926fdc19f4d338889ceca1b1bdb3 to your computer and use it in GitHub Desktop.
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