理解_GET_和Python描述符
class Celsius(object): def __init__(self, value=0.0): self.value = float(value) def __get__(self, instance, owner): return self.value def __set__(self, instance, value): self.value = float(value)class Temperature(object): celsius = Celsius()
instance
owner
__get__
蓝山帝景
qq_遁去的一_1
相关分类