摘要: 函数最后->Any是函数返回值的注释 class EasyDict(dict): """Convenience class that behaves like a dict but allows access with the attribute syntax.""" def __getattr__ 阅读全文
posted @ 2022-09-13 22:38 Tomorrow1126 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 这是由于conda的激活命令出了问题,解决方法如下: # 激活环境 source activate # 退出环境 source deactivate 随后解决问题。 可以进行激活环境了: conda activate your-env-name 阅读全文
posted @ 2022-09-13 22:35 Tomorrow1126 阅读(164) 评论(0) 推荐(0) 编辑
摘要: https://zhuanlan.zhihu.com/p/144773033 当我们在写程序时,不确定将来要往函数中传入多少个参数,即可使用可变参数(即不定长参数),用*args,**kwargs表示。 *args称之为Non-keyword Variable Arguments,无关键字参数; * 阅读全文
posted @ 2022-09-13 14:50 Tomorrow1126 阅读(523) 评论(0) 推荐(0) 编辑