class Han1:
def int(self, A, B):
self.A = A
self.B = B
def __play():
print("她喜欢玩!")
def speak(self):
self.__startEngine()
print("%她在说话!" % self.color)
class Han2:
@classmethod
def ider(cls):
print()
@staticmethod
def testStatic():
print()
class Han2:
def init(self, C, D):
self.C = C
self.D = D
class Any:
def jump(self):
self.__startEngine()
print("%他在跳!" % self.color)
@classmethod
def testClassMethod(cls):
print()
@staticmethod
def testStatic():
print()
class Haha1:
pass
class Haha2:
pass
# 多继承
class Moon1(Haha1, Haha2):
def __init__(self, x, y):
self.X = x
self.label = y
class Ang:
def lovely(self):
self.__startEngine()
print("%她很可爱!" % self.color)
@classmethod
def lovely(cls):
print("她很可爱!")
@staticmethod
def lovely():
print("她很可爱!")
class Haha2:
pass
# 单继承
class Moon2(Haha2):
def happy(self):
self.__startEngine()
print("%她很爱笑!" % self.color)
@classmethod
def beautiful(cls):
print("她很美丽!")
@staticmethod
def beautiful(self):
print("她很美丽!")
不管对错