.net

.net

 

2015年2月28日

Python 单例

摘要: 方法1: 1 class Singleton(object): 2 def __new__(cls, *args, **kwargs): 3 if '_inst' not in vars(cls): 4 cls._inst = super(Single... 阅读全文

posted @ 2015-02-28 09:21 严杰 阅读(147) 评论(0) 推荐(0) 编辑

导航