摘要: 运行多线程出现的错误 调试了很久,最后发先 __init__ 写错了,修改后后,运行正确。 阅读全文
posted @ 2018-07-24 20:32 sneike 阅读(2570) 评论(0) 推荐(0) 编辑
摘要: 判断是否为None的情况 if not x if x is None if not x is None if x is not None`是最好的写法,清晰,不会出现错误,以后坚持使用这种写法。 使用if not x这种写法的前提是:必须清楚x等于None, False, 空字符串" ", 0, 空 阅读全文
posted @ 2018-07-24 12:03 sneike 阅读(1000) 评论(0) 推荐(0) 编辑