def dslice(dict_, keys, strict=True):
    """Returns a new dictionary containing only the specified keys"""
    ret = {}
    for key in keys:
        if strict or key in dict_:
            ret[key] = dict_[key]
    return ret
