0
How to attribute something strongly private
attribute strongly private and access it from outside of the class.
1 Resposta
0
In Python there is not such thing as making attributes private or protected. Everything can be accessed from outside the class. The only thing closest to that is that you can name the attributes differently and Python then gives them a different name. See this for reference
https://code.sololearn.com/cblWIvG9yBOj/?ref=app
Although the attribute name was __name, Python stored it as _Hello__name. This is the closest you can get to making something private.
See this also
https://www.sololearn.com/learn/Python/2471/