File: values.py

package info (click to toggle)
python-twilio 6.51.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,260 kB
  • sloc: python: 128,982; makefile: 51
file content (12 lines) | stat: -rw-r--r-- 255 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
from six import iteritems
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 iteritems(d) if v != unset}