One underline in the beginning:
"Python doesn't have real private methods, so one underline in the start of a method or attribute means you shouldn't access this method."
Two underlines in the beginning:
"So, when you create a method starting with __ it means that you don't want to anyone can override it, it will be accessible only from inside the own class."
Two underlines in the beginning and in the end:
"When we see a method like
__this__
, don't call it. Because it means it's a method which Python calls, not by you."
No comments:
Post a Comment