随笔分类 - python
摘要:转自 https://www.cnblogs.com/bugmaker/articles/2444905.html MySQLdb.connection.ping()函数可以用来检测在访问前检测数据库的连接是否存在 使用help函数获得帮助信息如下: Checks whether or not th
阅读全文
摘要:class A(object): # 属性默认为类属性(可以给直接被类本身调用) num = "类属性" # 实例化方法(必须实例化类之后才能被调用) def func1(self): # self : 表示实例化类后的地址id print("func1") print(self) # 类方法(不需
阅读全文