|
|
|
|
|
by s_kilk
2966 days ago
|
|
Not really, the empty list, None, and False are distinct values in Python. In [1]: [] is None
Out[1]: False
In [2]: [] is False
Out[2]: False
In [3]: [] == False
Out[3]: False
In [4]: [] == None
Out[4]: False
In [5]: False is None
Out[5]: False
In [6]: False == None
Out[6]: False
This kind of relatively fine-grained distinction between different types of data is essential for operation in a world where other systems presume that you can handle these distinctions. |
|