I'm relatively new to python and I'm working on a script that uses class objects extensively. I remember from my C++ lessons years ago that C++ class objects have public and private variables, where public variables can be accessed like MyClass.myVariable = #, but private variables have to be set using a predefined function, ie, MyClass.setMyVariable(#). From what I remember, this allowed you to ensure that variables were of the right type and prevented misuse or corruption.
Is there something equivalent in python? For a class-intensive script, should I bother to make internal class functions that set and pass the variables contained in the class object, or should I just set and access the variables directly?
I'm using python 3 on linux Mint. The code is ultimately for an Android app.