in python tutorial added that python cannot hide its attributes from other classes. some thing such as private data in C++ or java..But also i know that we can use _ or __ to set some variables as privated one but it is not enogh. I think it is a weak if it is not any thing to do it.
in python tutorial added that python cannot hide its attributes from other classes. some
Share
This is part of Python’s philosophy. It basically trusts you to be sensible and exercise caution with anything that starts with an underscore. If you really want to hide state so no one can touch it, you can do this: