
On Sun, May 23, 2021 at 10:30 PM Marco Sulla <Marco.Sulla.Python@gmail.com> wrote:
I think the only reason to introduce something like `private` is refactoring. If you added a `_variable` and later you decided to expose it, you have to change it to `variable`. This is something that in languages like Java is not necessary, you have only to change the variable from private to public. This sometimes bothered me in Python.
Since you started with it private, you should be able to solve this with a simple search-and-replace within the class's own definition. Nothing outside the class should be affected. If it's that hard to replace "self._variable" with "self.variable", then you can always create a property to make it available under both names. ChrisA