Double underscore in this context means hit the underscore key twice before typing the name of something like a method., yes? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Double underscore in this context means hit the underscore key twice before typing the name of something like a method., yes?

double underscore has special meaning

17th Dec 2016, 11:20 AM
Sam
3 Answers
+ 2
Double underscore represent both magic methods and private attributes. Double underscores are meant to be put one at the beginning and one at the end of the method's name for magic methods whereas for making an atrribute private they both have to be typed at the beginning !.
31st Dec 2016, 10:41 AM
J C Karthikeyan
J C Karthikeyan - avatar
0
double underscore has special meaning
17th Dec 2016, 11:20 AM
Sam
0
yes
17th Dec 2016, 11:22 AM
Rishi Anand
Rishi Anand - avatar