# -*- coding: utf-8 -*-
class A(object):
"""
a
"""
def __init__(self):
"""
init
"""
self.param = 'a'
self._param = '_a'
self.__param = '__a'
def __method(self):
"""
:return:
"""
print("a __method")
def _method(self):
"""
:return:
"""
print("a _method")
def method(self):
"""
:return:
"""
print('a method')
self.__method()
class B(A):
"""
b
"""
def __method(self):
"""
:return:
"""
print("b __method")
def _method(self):
"""
:return:
"""
print("b _method")
def method(self):
"""
:return:
"""
print('b method')
self.__method()
a = A()
a.method()
a._method()
a.__method()
b = B()
b.method()
b._method()
b.__method()
print(b.param)
print(b._param)
print(b.__param)