随笔分类 -  python

摘要:转自 https://www.cnblogs.com/bugmaker/articles/2444905.html MySQLdb.connection.ping()函数可以用来检测在访问前检测数据库的连接是否存在 使用help函数获得帮助信息如下: Checks whether or not th 阅读全文
posted @ 2022-04-30 19:28 刘佳芳 阅读(313) 评论(0) 推荐(0) 编辑
摘要:class A(object): # 属性默认为类属性(可以给直接被类本身调用) num = "类属性" # 实例化方法(必须实例化类之后才能被调用) def func1(self): # self : 表示实例化类后的地址id print("func1") print(self) # 类方法(不需 阅读全文
posted @ 2022-02-18 17:45 刘佳芳 阅读(22) 评论(0) 推荐(0) 编辑

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