- There isn’t private and protected like Java in Python
-
Usually uses two underscores to simulate the behavior of private. For example
self.__x
-
1 can be used for
protected
orprivated
-
1 can be used for
-
Values can be modified even being when they are
privated
Warning
Should not modify attribute outside its class
References
- Ramalho, 2022, p381-383