Learned about a crazy “feature” of Python today: “Name Mangling”.

If you name a class method or attribute __mymethod, it will magically get renamed _MyClass__mymethod.

https://docs.python.org/3/tutorial/classes.html#private-variables

Advertisements