Files
06-Note/Python-100-Days/Day01-15/Day08/access.py
sherlockforrest bf2ed2e31f 更新
2023-06-20 09:22:53 +08:00

19 lines
230 B
Python

class Test:
def __init__(self, foo):
self.__foo = foo
def __bar(self):
print(self.__foo)
print('__bar')
def main():
test = Test('hello')
test._Test__bar()
print(test._Test__foo)
if __name__ == "__main__":
main()