2017年12月4日

[python]请利用@property给一个Screen对象加上width和height属性,以及一个只读属性resolution:

摘要: # -*- coding: utf-8 -*- class Screen(object): @property #相当于定义get_width方法 def width(self): return self._width @width.setter #相当于定义set_width方法 def width(self,value): ... 阅读全文

posted @ 2017-12-04 12:03 cccmon 阅读(928) 评论(0) 推荐(0) 编辑

导航