0

I've implemented a nested properties class. When i was working with it i used the __getattr__(self, name) method and i noticed that when I referred to a method in my class name def MethodName(self) it would pass a string to the __getattr__(self,name) method with name = MethodName This makes sense for me.

However if i changed my def MethodName(self) to def __MethodName(self) the string passed is name = _ClassName__MethodName

Why the addition of the _ClassName ?

Ephreal
  • 1,835
  • 2
  • 18
  • 35

0 Answers0