def pop_to(source, dest, key, name=None):
    """
    A convenience function which pops a key k from source to dest.
    None values are not passed on.  If k already exists in dest an
    error is raised.
    """
    value = source.pop(key, None)
    if value is not None:
        safe_setitem(dest, key, value, name=name)
    return value
def pop_to ( source , dest , key , name = None ) : value = source . pop ( key , None ) if value is not None : safe_setitem ( dest , key , value , name = name ) return value
A convenience function which pops a key k from source to dest.
    None values are not passed on.  If k already exists in dest an
    error is raised.