随笔分类 - python
摘要:官方文档在此:https://docs.python.org/zh-cn/3.6/library/typing.html 类型别名的作用就是可以定义自己想声明的类型。比如我把List[int]定义为vector_of_int,不过我觉得没啥用,又不能定义成vector 2. newtype 把一个类
阅读全文
摘要: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
阅读全文