python----特性(property)、静态方法(staticmethod)、类方法(classmethod)

1、特性property 一、什么事特性propertypython property是一种特殊的属性,访问它时会执行一段功能(函数)而后返回值函数 __author__ = 'rxz' # -*- encoding:utf-8 -*- import math class Circle: def __init__(self,radius): self.radius =r
相关文章
相关标签/搜索