我如何在Python中引用null对象?
In Python, the 'null' object is the singleton None .
None
(在Python中,'null'对象是单例None 。)
The best way to check things for "Noneness" is to use the identity operator, is :
is
(检查“无效”的最佳方法是使用身份运算符, is :)
if foo is None: ...
2.1m questions
2.1m answers
60 comments
57.0k users