def copy_dict_no_nones(d):
    """Return a copy of the supplied 'd' minus any keys mapping to 'None'.

    Usage examples:
        >>> e = copy_dict_no_nones({'a': None, 'b': 1, 'c': None, 'd': 2})
        >>> e == {'b': 1, 'd': 2}
        True

    :d: the dictionary to copy
    :returns: a copy of 'd' minus any keys mapping to 'None'

    """
    return {k: v for k, v in d.iteritems() if v is not None}