Python属性函数property

说明 Python中的property被称为属性函数,它能够将类方法转换为只读属性,从新实现一个属性的setter和getter方法python 将类方法准换成只读属性 正常状况下使用装饰器形式@property使用 如:git class Test(object): def __init__(self, a, b): """Constructor"""
相关文章
相关标签/搜索