Forwarded from Frost's Notes
#share 头回见对这两个概念的清楚解释
https://discuss.python.org/t/should-it-be-possible-to-use-none-as-a-type-instead-of-nonetype/101862/2
https://discuss.python.org/t/should-it-be-possible-to-use-none-as-a-type-instead-of-nonetype/101862/2
Discussions on Python.org
Should it be possible to use None as a type (instead of NoneType)?
The type of None is NoneType [not a built-in, it’s type(None)], but in typing we use None as a type: my_var: None|int = 3 Besides of typing, Pyhon does not accept None as a type. Technically None is indeed not a type. OTOH None is quite special. I think…
❤1