python----特性(property)、靜態方法(staticmethod)、類方法(classmethod)

1、特性property 一、什麼事特性propertypython property是一種特殊的屬性,訪問它時會執行一段功能(函數)而後返回值函數 __author__ = 'rxz' # -*- encoding:utf-8 -*- import math class Circle: def __init__(self,radius): self.radius =r
相關文章
相關標籤/搜索