It appears that \"if x\" is almost like short-hand for the longer \"if x is not None\" syntax. Are they functionally identical or are there cases where for a given value of
The former tests trueness, whereas the latter tests for identity with None. Lots of values are false, such as False, 0, '', and None, but only None is None.