smpl_util.util.true

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

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

Examples

>>> d = {'a' : True , 'b' : True , 'c' : False}
>>> true('a', d)
True
>>> true('c', d)
False
>>> true('x', d)
False