voipms-python/voipms/base/values.py
2020-03-16 22:58:09 -04:00

12 lines
237 B
Python

unset = object()
def of(d):
"""
Remove unset values from a dict.
:param dict d: A dict to strip.
:return dict: A dict with unset values removed.
"""
return {k: v for k, v in d.items() if v != unset}