3 ms·
Sometimes Python leans to the DWIM side: >>> 42 is not None True >>> 'oo' in 'foobar' True One could argue that both answers should be False, because:
by jwilk 9y ago
Sometimes Python leans to the DWIM side:
>>> 42 is not None
True
>>> 'oo' in 'foobar'
True
One could argue that both answers should be False, because:
>>> 42 is (not None)
False
>>> 'oo' in iter('foobar')
False