Fix an issue where __ prefixed variables where not hidden when accessed from a class

Everything worked well when looking at it from an instance perspective.
This commit is contained in:
Dave Halter
2018-08-03 11:05:49 +02:00
parent 1a4be5c91c
commit 95a1a69771
2 changed files with 22 additions and 0 deletions

View File

@@ -417,6 +417,9 @@ class PrivateVar():
def __private_func(self):
return 1
#? int()
__private_func()
def wrap_private(self):
return self.__private_func()
#? []
@@ -425,6 +428,8 @@ PrivateVar().__var
PrivateVar().__var
#? []
PrivateVar().__private_func
#? []
PrivateVar.__private_func
#? int()
PrivateVar().wrap_private()