摘要: 单例模式的实现方式 将类实例绑定到类变量上 class Singleton(object): _instance = None def __new__(cls, args): if not isinstance(cls._instance, cls): cls._instance = super(S 阅读全文
posted @ 2018-08-15 19:09 公众号python学习开发 阅读(568) 评论(0) 推荐(0) 编辑
摘要: ``` def save_app_info(self): try: # update app_info print(self.dicts) data = db_session.query(App_Info).filter_by(app_id=self.app_id,mall_name=self.mall... 阅读全文
posted @ 2018-08-15 18:32 公众号python学习开发 阅读(7103) 评论(0) 推荐(0) 编辑