摘要: #-*- coding:utf-8 -*- class Car(object): # 静态字段 通过Car.country来访问.(静态字段属于类)(普通字段属于对象) country = '中国' def __init__(self,make,model,year): # 普通字段 obj.name self.make = ma... 阅读全文
posted @ 2017-09-23 18:24 陈奕迅-可以了 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 新式类,具有三种@property装饰器 经典类 阅读全文
posted @ 2017-09-23 18:23 陈奕迅-可以了 阅读(249) 评论(0) 推荐(0) 编辑