On 2019-09-01 8:12 AM, Hongyi Zhao wrote:
Hi,

The following two forms are always equivalent:

``if var'' and ``if var is not None''

Regards


Not so. Here is an example -

>>> var = []
>>> bool(var)
False
>>> bool(var is not None)
True
>>>

Frank Millman

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to