is_not_None

iteration_utilities.is_not_None(value, /)

Returns False if value is None, otherwise True.

Parameters:

value : any type

The value to test for None.

Returns:

is_not_none : bool

False if value is None otherwise it returns True.

Examples

This function is equivalent to lambda x: x is not None but significantly faster:

>>> from iteration_utilities import is_not_None
>>> is_not_None(None)
False
>>> is_not_None(False)
True