python中类的定义
class Man(object): def __init__(): print 'Man init' pass @staticmethod def speak(): print 'speak'
继承
class Teacher(Man): def __init__(self): print 'Teacher init' def act(self): #使用self调用基类的speak self.speak()