File: values.py

package info (click to toggle)
python-twilio 7.7.1%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,976 kB
  • sloc: python: 148,884; makefile: 50; sh: 2
file content (11 lines) | stat: -rw-r--r-- 226 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
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}