def set(obj, glob, value, separator="<STR_LIT:/>", afilter=None):
changed = <NUM_LIT:0><EOL>globlist = __safe_path__(glob, separator)<EOL>for path in _inner_search(obj, globlist, separator):<EOL><INDENT>changed += <NUM_LIT:1><EOL>dpath.path.set(obj, path, value, create_missing=False, afilter=afilter)<EOL><DEDENT>return changed<EOL>
Given a path glob, set all existing elements in the document
to the given value. Returns the number of elements changed.