文章目录 一、特殊方法 1.特殊方法: 2.类的基本结构: 二、练习 三、封装 四、封装进阶 五、装饰器@property 一、特殊方法 class Person: name = 'Tom' def speak(self): print('Hello,I\'m %s'%self.name)