dpath/util.py
def new(obj, path, value, separator="/"):
    """
    Set the element at the terminus of path to value, and create
    it if it does not exist (as opposed to 'set' that can only
    change existing keys).

    path will NOT be treated like a glob. If it has globbing
    characters in it, they will become part of the resulting
    keys
    """
    pathobj = dpath.path.path_types(obj, path.lstrip(separator).split(separator))
    return dpath.path.set(obj, pathobj, value, create_missing=True)

    Set the element at the terminus of path to value, and create
    it if it does not exist (as opposed to 'set' that can only
    change existing keys).

    path will NOT be treated like a glob. If it has globbing
    characters in it, they will become part of the resulting
    keys
    
Set the element at the terminus of path to value, and create
it if it does not exist (as opposed to 'set' that can only
change existing keys).

path will NOT be treated like a glob. If it has globbing
characters in it, they will become part of the resulting
keys
Set the element at the terminus of path to value and create it if it does not exist ( as opposed to ' set ' that can only change existing keys ) . path will NOT be treated like a glob . If it has globbing characters in it they will become part of the resulting keys
def new(obj, path, value, separator="/"):
    pathobj = dpath.path.path_types(obj, path.lstrip(separator).split(separator))
    return dpath.path.set(obj, pathobj, value, create_missing=True)
def new ( obj , path , value , separator = "/" ) : pathobj = dpath . path . path_types ( obj , path . lstrip ( separator ) . split ( separator ) ) return dpath . path . set ( obj , pathobj , value , create_missing = True )
Set the element at the terminus of path to value, and create
it if it does not exist (as opposed to 'set' that can only
change existing keys).
Set the element at the terminus of path to value and create it if it does not exist ( as opposed to ' set ' that can only change existing keys ) .
"""
    Set the element at the terminus of path to value, and create
    it if it does not exist (as opposed to 'set' that can only
    change existing keys).

    path will NOT be treated like a glob. If it has globbing
    characters in it, they will become part of the resulting
    keys
    """
obj
path
value
separator