Skip to content

Commit 09ffe70

Browse files
Update mazic_method.md
1 parent d58c385 commit 09ffe70

File tree

1 file changed

+0
-85
lines changed

1 file changed

+0
-85
lines changed

OOPS/mazic_method.md

-85
Original file line numberDiff line numberDiff line change
@@ -1,86 +1 @@
1-
Overview of Magic Methods
2-
Binary Operators
3-
Operator Method
4-
+ object.__add__(self, other)
51

6-
- object.__sub__(self, other)
7-
8-
* object.__mul__(self, other)
9-
10-
// object.__floordiv__(self, other)
11-
12-
/ object.__truediv__(self, other)
13-
% object.__mod__(self, other)
14-
15-
** object.__pow__(self, other[, modulo])
16-
17-
<< object.__lshift__(self, other)
18-
19-
>> object.__rshift__(self, other)
20-
21-
& object.__and__(self, other)
22-
23-
^ object.__xor__(self, other)
24-
25-
| object.__or__(self, other)
26-
27-
Extended Assignments
28-
Operator Method
29-
+= object.__iadd__(self, other)
30-
31-
-= object.__isub__(self, other)
32-
33-
*= object.__imul__(self, other)
34-
35-
/= object.__idiv__(self, other)
36-
37-
//= object.__ifloordiv__(self, other)
38-
%= object.__imod__(self, other)
39-
40-
**= object.__ipow__(self, other[, modulo])
41-
42-
<<= object.__ilshift__(self, other)
43-
44-
>>= object.__irshift__(self, other)
45-
46-
&= object.__iand__(self, other)
47-
48-
^= object.__ixor__(self, other)
49-
50-
|= object.__ior__(self, other)
51-
52-
Unary Operators
53-
Operator Method
54-
- object.__neg__(self)
55-
56-
+ object.__pos__(self)
57-
58-
abs() object.__abs__(self)
59-
60-
~ object.__invert__(self)
61-
62-
complex() object.__complex__(self)
63-
64-
int() object.__int__(self)
65-
66-
long() object.__long__(self)
67-
68-
float() object.__float__(self)
69-
70-
oct() object.__oct__(self)
71-
72-
hex() object.__hex__(self
73-
74-
Comparison Operators
75-
Operator Method
76-
< object.__lt__(self, other)
77-
78-
<= object.__le__(self, other)
79-
80-
== object.__eq__(self, other)
81-
82-
!= object.__ne__(self, other)
83-
84-
>= object.__ge__(self, other)
85-
86-
> object.__gt__(self, other)

0 commit comments

Comments
 (0)