摘要: 简介: python 描述符是新式类(继承自object)中的语言协议,基于描述符可以提供更佳优雅的解决方案。 python的classmethod, staticmethod, property都是基于描述符建立的。 描述符的协议: 定义了__set__, __get__, __delete__3 阅读全文