摘要: 引入描述器 以stackoverflow上关于描述器(descriptor )的疑问开篇。 class Celsius: def __get__(self, instance, owner): return 5 * (instance.fahrenheit - 32) / 9 def __set__ 阅读全文
posted @ 2020-10-05 20:44 职场亮哥 阅读(630) 评论(0) 推荐(0) 编辑