摘要: yield from 先说说3个东西,可迭代iterable,迭代器iterator,生成器generator,3者关系层层递进。 iterable : \__iter__ (支持for循环) iterator : \__iter__ \_\_next__ (支持for循环、next) genera 阅读全文
posted @ 2020-04-17 17:56 friedCoder 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 参考 https://q.cnblogs.com/q/113067/ https://superuser.com/questions/1319047/cant install virtual interpreter in pycharm in linux 阅读全文
posted @ 2020-04-17 17:08 friedCoder 阅读(360) 评论(0) 推荐(0) 编辑
摘要: mypy 静态类型检查可以帮助coder在运行前(编译期)发现由于类型错误带来的bug 在开发的项目越来越大的时候,不必阅读更多的代码来确定你要修改的某个方法是否会影响其他的代码的运行 使用方法:(先安装) 类型:https://docs.python.org/zh cn/3/library/typ 阅读全文
posted @ 2020-04-17 17:05 friedCoder 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 转:https://blog.csdn.net/dqchouyang/article/details/47153201 软件源不同 pip用来安装来自PyPI(https://www.python.org/)的python所有的依赖包,并且可以选择安装任何在PyPI上已上传的先前版本的依赖包,个人认 阅读全文
posted @ 2020-04-17 17:01 friedCoder 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 用法记录: 更多参考:https://www.cnblogs.com/Uncle Guang/p/8796507.html 阅读全文
posted @ 2020-04-17 05:46 friedCoder 阅读(91) 评论(0) 推荐(0) 编辑