Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Last active July 3, 2020 04:42
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/a2387f7e3196369f224bcb0bb46cf763 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/a2387f7e3196369f224bcb0bb46cf763 to your computer and use it in GitHub Desktop.
Operator Magic Method
+= __iadd__(self,other)
-= __isub__(self,other)
*= __imul__(self,other)
@= __imatmul__(self,other)
/= __itruediv__(self,other)
//= __ifloordiv__(self,other)
%= __imod__(self,other)
**= __ipow__(self,other)
<<= __ilshift__(self,other)
>>= __irshift__(self, other)
&= __iand__(self, other)
^= __ixor__(self, other)
|= __ior__(self, other)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment