@classmethod与@staticmethod以及属性函数@property

@classmethod与@staticmethod以及属性函数@property

之前是一知半解,现在懂了,记录一下@classmethod举例class Date(object): def __init__(self,day=0,month=0,year=0) self.day = day self.month = month self.year = year @classmethod ...