+ 2

What does self , other ): mean ???

what's the __add__(self , other ): mean I don't understand 'other' ether

19th Feb 2017, 12:13 AM
Darren Samora
Darren Samora - avatar
4 Answers
+ 10
self refers to the object itself and other refers to another object. self is always passed as the first argument in a method unless its a class method or a static method.
19th Feb 2017, 1:23 AM
Aidan Haddon-Wright
Aidan Haddon-Wright - avatar
+ 8
Oh, I forgot to mention that self is passed implicitly. So when you call a method, you dont have to include self as a parameter
19th Feb 2017, 8:57 AM
Aidan Haddon-Wright
Aidan Haddon-Wright - avatar
0
k
19th Feb 2017, 3:45 PM
Darren Samora
Darren Samora - avatar
0
thanks
19th Feb 2017, 3:45 PM
Darren Samora
Darren Samora - avatar