3 ms·
For example, 'if x == None' versus 'if x is None'. The latter is to be preferred (since identity is faster and more clear than comparison), but you see the for
by clintonc 11y ago
For example, 'if x == None' versus 'if x is None'. The latter is to be preferred (since identity is faster and more clear than comparison), but you see the former sometimes.
- aerovistae 11y agoYes that's the only case I know of where 'is' is regularly used.