smpl_util.util.has

smpl_util.util.has(key, ddict)[source]

Checks if the key is in the dict and not None.

Examples

>>> d = {'a' : 1 , 'b' : 2 , 'c' : 3}
>>> has('a',d)
True
>>> has('x',d)
False