2016年12月5日

python如何实现静态变量

摘要: python中是不支持静态变量的,所以可以通过以下的方法来实现静态变量的功能: 代码: class CTest(object): '''python静态变量实现方法''' __init=None def __new__(cls,value): if cls.__init is None: cls._ 阅读全文

posted @ 2016-12-05 17:36 sammy1989 阅读(3153) 评论(0) 推荐(0) 编辑

导航