随笔分类 -  python

摘要:官方文档在此:https://docs.python.org/zh-cn/3.6/library/typing.html 类型别名的作用就是可以定义自己想声明的类型。比如我把List[int]定义为vector_of_int,不过我觉得没啥用,又不能定义成vector 2. newtype 把一个类 阅读全文
posted @ 2021-11-10 19:20 ijpq 阅读(89) 评论(0) 推荐(0) 编辑
摘要:https://stackoverflow.com/questions/4162456/forward-declaration-of-classes?rq=1 class Base: pass # subs = [Sub3,Sub1] # Note that this is NOT a list o 阅读全文
posted @ 2021-10-14 14:57 ijpq 阅读(551) 评论(0) 推荐(0) 编辑

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