随笔 - 3  文章 - 42 评论 - 0 阅读 - 5165

07 2018 档案
实现单例的三个方法
摘要:# 方法一: 使用一个类方法实现单例模式 import settings class Mysql: __instance = None def __init__(self, host,port): self.host = host self.port = port @classmethod def singleton(cls)... 阅读全文
posted @ 2018-07-17 21:22 muzinianhua 阅读(118) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示