TODO: at some point perhaps this could support relative * keypaths?
181869
function build$1 ( el, keypath, value ) {
  	var sets = [];

  	// set multiple keypaths in one go
  	if ( isObject( keypath ) ) {
  		for ( var k in keypath ) {
  			if ( keypath.hasOwnProperty( k ) ) {
  				sets.push( [ findModel( el, k ).model, keypath[k] ] );
  			}
  		}

  	}
  	// set a single keypath
  	else {
  		sets.push( [ findModel( el, keypath ).model, value ] );
  	}

  	return sets;
  }
86733
def -(other)
      other = other.to_key_path
      raise KeyError unless prefix?(other)

      super(other.length)
    end
41772
def make_relative_to_root(path):
  """"""
  return os.path.normpath(path.format(pex_root=ENV.PEX_ROOT))
1174781
function build(ctx, keypath, value) {
  const sets = [];

  // set multiple keypaths in one go
  if (isObject(keypath)) {
    for (const k in keypath) {
      if (hasOwn(keypath, k)) {
        sets.push([findModel(ctx, k).model, keypath[k]]);
      }
    }
  } else {
    // set a single keypath
    sets.push([findModel(ctx, keypath).model, value]);
  }

  return sets;
}
1178493
def _relative_paths(xs, base_path):
    
    if isinstance(xs, six.string_types):
        if xs.startswith(base_path):
            return xs.replace(base_path + "/", "", 1)
        else:
            return xs
    elif isinstance(xs, (list, tuple)):
        return [_relative_paths(x, base_path) for x in xs]
    elif isinstance(xs, dict):
        out = {}
        for k, v in xs.items():
            out[k] = _relative_paths(v, base_path)
        return out
    else:
        return xs
833631
def extract_keyhandle(path, filepath):
    """"""

    keyhandle = filepath.lstrip(path)
    keyhandle = keyhandle.split("/")
    return keyhandle[0]
502312
function resolvePath (moduleName, relativePath)
{
  if (! moduleName) {
    return null;
  }

  if (! relativePath) {
    return null;
  }

  const mainPath = require.resolve(moduleName);
  if (! mainPath) {
    return null;
  }

  const rootLocations = [];
  const dirs = mainPath.split(path.sep);
  let lastSegment = dirs.pop();
  while (lastSegment) {
    const location = dirs.concat(['package.json']).join(path.sep);
    rootLocations.push(location);
    lastSegment = dirs.pop();
  }

  for(const location of rootLocations) {
    if (fs.existsSync(location)) {
      const cli = path.resolve(path.dirname(location), relativePath);
      if (fs.existsSync(cli)) {
        return cli;
      }
    }
  }

  return null;
}
631419
function(relativeProjectPath, relative){

      var src = [];
      var complete_path;
      var patsy = this;

      if(patsy.utils.isArray(relative)){
        // For each path, check if path is negated, if it is, remove negation
        relative.forEach(function(_path){

          if(patsy.utils.isPathNegated(_path)){

            _path = _path.slice(1);
            complete_path = '!' + relativeProjectPath + _path;
          } else {

            complete_path = relativeProjectPath + _path;
          }

          src.push(path.normalize(complete_path));

        });
      } else {

        if(patsy.utils.isPathNegated(relative)){

          var _path = relative.slice(1);
          complete_path = '!' + relativeProjectPath + _path;
        } else {

          complete_path = relativeProjectPath + relative;
        }

        src = path.normalize(complete_path);
      }


      return src;

    }
391488
def value_for_keypath(dict, keypath):
    

    if len(keypath) == 0:
        return dict

    keys = keypath.split('.')
    value = dict
    for key in keys:
        if key in value:
            value = value[key]
        else:
            return None

    return value
775822
def _get_relative_path(self):
    """"""
    param_string = self._get_query_string()
    if self.path is None:
      path = '/'
    else:
      path = self.path
    if param_string:
      return '?'.join([path, param_string])
    else:
      return path
558423
private void getResPathKeys(String[] keys, int depth) {
        ICUResourceBundle b = this;
        while (depth > 0) {
            keys[--depth] = b.key;
            b = b.container;
            assert (depth == 0) == (b.container == null);
        }
    }
684014
def __ConstructRelativePath(self, method_config, request,
                                relative_path=None):
        """"""
        python_param_names = util.MapParamNames(
            method_config.path_params, type(request))
        params = dict([(param, getattr(request, param, None))
                       for param in python_param_names])
        params = util.MapRequestParams(params, type(request))
        return util.ExpandRelativePath(method_config, params,
                                       relative_path=relative_path)
890753
function resolvePathFor(options, src) {
  if (Array.isArray(src)) {
    src.forEach(dir => resolvePathFor(options, dir));
  } else {
    const relativePath = get(options, src);
    if (Array.isArray(relativePath)) {
      set(options, src, relativePath.map(n => getAbsPath(n)));
    } else {
      const _absPath = getAbsPath(relativePath);
      relativePath !== _absPath && set(options, src, _absPath);
    }
  }
}
983630
def get_value_from_path(self, keypath):
        
        if isinstance(keypath, list):
            if len(keypath) == 0:
                # empty list is root
                return 
            val = self 
            for next_key in keypath:
                val = val[next_key]
            return val
        else:
            return self.__dict__['p'][keypath]
685253
function(paths) {

      function relativePath(p, dirType) {
          var relativeStart = p.indexOf('./') === 0 || p.indexOf('../') === 0;
          return relativeStart? prefixPath(options.dirs.client,p) : prefixPath(options.dirs[dirType], p);
      }

      function prefixPath(base,p) {
          base = base.replace(/^\//,'');
          if (p === '*') {
            return base;
          }
          p = p.replace(/\/\*$/,'');
          return path.join(base,p);
      }

      function entries(from, dirType) {
        if (from == null) {
          return [];
        }
        var list = (from instanceof Array)? from : [from];

        return list.map(function(value) {
          return relativePath(value, dirType);
        });
      }

      paths.css = entries(paths.css, 'css');
      paths.code = entries(paths.code, 'code');
      paths.tmpl = entries(paths.tmpl || paths.templates, 'templates');

      if (paths.view) {
        paths.view = relativePath(paths.view, 'views');
      }

      return paths;
    }
921265
private static void getResPathKeys(String path, int num, String[] keys, int start) {
        if (num == 0) {
            return;
        }
        if (num == 1) {
            keys[start] = path;
            return;
        }
        int i = 0;
        for (;;) {
            int j = path.indexOf(RES_PATH_SEP_CHAR, i);
            assert j >= i;
            keys[start++] = path.substring(i, j);
            if (num == 2) {
                assert path.indexOf(RES_PATH_SEP_CHAR, j + 1) < 0;
                keys[start] = path.substring(j + 1);
                break;
            } else {
                i = j + 1;
                --num;
            }
        }
    }
992254
function _get(obj, keypath) {
    var parts = _keyPathNormalize(keypath).split('.')
    var dest = obj
    parts.forEach(function(key) {
        if (isNon(dest)) return !(dest = undf())
        dest = dest[key]
    })
    return dest
}