摘要: 我的mysql版本是5.6.12,解压后,按网上说的创建my.ini文件,如同你那样。也遇到你所遇到的问题,找不到答案,快疯了。后来想想,为什么不要自带的my-default.ini呢。于是去掉my-default.ini 中#注释的配置。cmd下运行:mysqld.exe --installnet 阅读全文
posted @ 2018-12-13 17:27 张朝华 阅读(182) 评论(0) 推荐(0) 编辑
摘要: def __init__(self,name): self.name = name self.courses = [] self.flag = False with open('students','rb') as f1,open('students.bak','wb') as f2: ... 阅读全文
posted @ 2018-11-28 17:54 张朝华 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 也就是说_replace方法并不是改变point里的x,而是新建了一个p,这个新建的p中的x=3,所以要改变原来的p还必须加上p=p._replace的这样的赋值语句 阅读全文
posted @ 2018-11-25 15:12 张朝华 阅读(165) 评论(0) 推荐(0) 编辑
摘要: def donot_use_mutable_default_param(idx=0, ids=None): if ids is None: ids = [] ids.append(idx) print(idx) print(ids) donot_use_mutable_default_param(idx=1) donot_use_mutable_d... 阅读全文
posted @ 2018-11-25 11:17 张朝华 阅读(102) 评论(0) 推荐(0) 编辑
摘要: def show(con,col_l,symbol,condition): con_name, con_value = con.split(symbol) # con_name = 'age',con_value = 20 for line_lst in read_file(): num = name_value[con_name] # num = 2 ... 阅读全文
posted @ 2018-11-24 11:28 张朝华 阅读(152) 评论(0) 推荐(0) 编辑
摘要: with open('file/userinfo',encoding='utf-8') as f1,\ # open('file/userinfo.new',mode='a',encoding='utf-8') as f2: 阅读全文
posted @ 2018-11-24 11:21 张朝华 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 生成器不调用不运行 列表推导式要值相当于调用生成器推导式,生成器中的值取了就没了 阅读全文
posted @ 2018-11-22 17:24 张朝华 阅读(110) 评论(0) 推荐(0) 编辑
摘要: def search(l,aim,start=0,end=None): if not end:end = len(l)-1 if start mid_value: start = mid+1 ret = search(l,aim,start,end) re... 阅读全文
posted @ 2018-11-22 15:59 张朝华 阅读(153) 评论(0) 推荐(0) 编辑
摘要: [1,2,3] [1,2,10] [1,2,10] 阅读全文
posted @ 2018-11-21 10:08 张朝华 阅读(152) 评论(0) 推荐(0) 编辑
摘要: try: 报错的代码行 except 报错类别 break 阅读全文
posted @ 2018-11-18 14:12 张朝华 阅读(135) 评论(0) 推荐(0) 编辑