Resolves a variable like :meth:`resolve` but returns the
        special `missing` value if it cannot be found.
509594
def resolve_or_missing(self, key):
        
        if self._legacy_resolve_mode:
            rv = self.resolve(key)
            if isinstance(rv, Undefined):
                rv = missing
            return rv
        return resolve_or_missing(self, key)
1194693
def resolve(self, _):
        
        if self.default_value == DUMMY_VALUE:
            if self.name in os.environ:
                return os.environ[self.name]
            else:
                raise VelException(f"Undefined environment variable: {self.name}")
        else:
            return os.environ.get(self.name, self.default_value)
910161
def fix_return_value(v, method_name, method=None, checker=None):
    
    # remove common check prefix
    method_name = (method_name or method.__func__.__name__).replace("check_","")
    if v is None or not isinstance(v, Result):
        v = Result(value=v, name=method_name)

    v.name         = v.name or method_name

    v.checker      = checker
    v.check_method = method

    return v
1345976
function resolve(val, i, isPath) {
			val = val.replace('~', '');
			return Promise.resolve(System.normalize(val))
					.then(function(normalized) {
						return System.locate({name: normalized, metadata: {}});
					})
					.then(function(address) {
						if (isPath) {
							options.includePaths.push(
									path.resolve(address.replace('file:', '').replace('.js', ''))
							);
						} else {
							var originalRelativePath      = path.relative(
									path.dirname(file.path),
									path.resolve(address.replace('file:', '').replace('.js', ''))
							);
							var originalRelativePathArray = originalRelativePath.split(path.sep);

							replacements[i] = path.posix?
									path.posix.join.apply(this, originalRelativePathArray):
									path.normalize(originalRelativePath).replace(/\\/g, '/').replace('//', '/');
						}
					});
		}
881350
def _ignore_variable(filename, varname):
    
    return (
        varname in IGNORED_VARIABLE_NAMES or
        (varname.startswith('_') and not varname.startswith('__')) or
        _is_special_name(varname))
836978
static String resolveVariables(String string) {
      if (string == null) {
         return null;
      }

      String rval = string;
      Matcher m = STRING_SUBSTITUTION.matcher(string);
      while (m.find()) {
         if (getInstance().properties.containsKey(m.group(1))) {
            rval = rval.replaceAll(Pattern.quote(m.group(0)), get(m.group(1)).asString());
         } else if (System.getProperties().contains(m.group(1))) {
            rval = rval.replaceAll(Pattern.quote(m.group(0)), System.getProperties().get(m.group(1)).toString());
         } else if (System.getenv().containsKey(m.group(1))) {
            rval = rval.replaceAll(Pattern.quote(m.group(0)), System.getenv().get(m.group(1)));
         }
      }
      return rval;
   }
852263
def resolve_variables(self, task):
        

        variables = {**task.variables, **self.project.variables}

        values = {}

        for variable in variables.values():
            value = self.variables.get(variable.name) or variable.default
            if value is None:
                raise LookupError(variable)
            values[variable.name] = value

        return values
563564
def resolve(self, value=None):
        

        # If we still have an uninitialized matcher init it now
        if self.matcher:
            self._init_matcher()

        # Evaluate the current set of matchers forming the expression
        matcher = self.evaluate()

        try:
            value = self._transform(value)
            self._assertion(matcher, value)
        except AssertionError as ex:
            # By re-raising here the exception we reset the traceback
            raise ex
        finally:
            # Reset the state of the object so we can use it again
            if self.deferred:
                self.reset()
1232592
private static String resolve(final String value, final Resolver resolver) {
		StringBuilder builder = new StringBuilder();
		int position = 0;

		String prefix = resolver.getPrefix() + "{";
		String postfix = "}";

		for (int index = value.indexOf(prefix); index != -1; index = value.indexOf(prefix, position)) {
			builder.append(value, position, index);

			int start = index + 2;
			int end = value.indexOf(postfix, start);

			if (end == -1) {
				InternalLogger.log(Level.WARN, "Closing curly bracket is missing for '" + value + "'");
				return value;
			}

			String name = value.substring(start, end);
			if (name.length() == 0) {
				InternalLogger.log(Level.WARN, "Empty variable names cannot be resolved: " + value);
				return value;
			}

			String data = resolver.resolve(name);
			if (data == null) {
				InternalLogger.log(Level.WARN, "'" + name + "' could not be found in " + resolver.getName());
				return value;
			} else {
				builder.append(data);
			}

			position = end + 1;
		}

		builder.append(value, position, value.length());
		return builder.toString();
	}
435475
function resolveVarValue (name, values) {
    if (is.undef(values) || is.args.empty(arguments)) {
        message('Error: Missing arguments');
        return undefined;
    }

    if (!is.string(name) || !is.object(values)) {
        message('Error: Check arguments type');
        return undefined;
    }

    const varName = name.slice(1);

    return values[varName] || null;
}
831604
def resolve(self, name):
        """"""
        for scope in reversed(self.scopes):
            try:
                return structured.resolve(scope, name)
            except (KeyError, AttributeError):
                continue

        raise AttributeError(name)
889370
def resolve_attr(obj, name):
    """"""
    # TODO: setup some hinting, so we can go directly to the correct
    # Maybe it's a dict ? Let's try dict lookup, it's the fastest
    try:
        return obj[name]
    except TypeError:
        pass
    except KeyError:
        raise exceptions.MissingField('Dict {0} has no attribute or key "{1}"'.format(obj, name))

    # Okay, it's not a dict, what if we try to access the value as for a regular object attribute?
    try:
        # Slight hack for better speed, since accessing dict is fast
        return obj.__dict__[name]
    except (KeyError, AttributeError):
        pass

    try:
        # Lookup using regular attribute
        return getattr(obj, name)
    except AttributeError:
        pass

    # Last possible choice, it's an iterable
    if isinstance(obj, collections.Iterable):
        return IterableAttr(obj, name)

    raise exceptions.MissingField('Object {0} has no attribute or key "{1}"'.format(obj, name))
1305255
def _missing_(cls, value):
        """"""
        if not (isinstance(value, int) and 0 <= value <= 1):
            raise ValueError('%r is not a valid %s' % (value, cls.__name__))
        extend_enum(cls, 'Unassigned [%d]' % value, value)
        return cls(value)
        super()._missing_(value)
647290
def _missing_(cls, value):
        """"""
        if not (isinstance(value, int) and 0x00 <= value <= 0xFF):
            raise ValueError('%r is not a valid %s' % (value, cls.__name__))
        if 0x0D <= value <= 0xEF:
            extend_enum(cls, 'Unassigned [0x%s]' % hex(value)[2:].upper().zfill(2), value)
            return cls(value)
        if 0xF0 <= value <= 0xFF:
            # [RFC 7540]
            extend_enum(cls, 'Reserved for Experimental Use [0x%s]' % hex(value)[2:].upper().zfill(2), value)
            return cls(value)
        super()._missing_(value)
548836
def maybe_resolve(object, resolve):
    
    if isinstance(object, dict) and object.get('$ref'):
        return resolve(object['$ref'])
    return object
102953
public Object resolveVariable(String pName) throws ELException {
		ELContext ctx = this.getELContext();
		return ctx.getELResolver().getValue(ctx, null, pName);
	}
1318644
def add_incomplete(var_name, dependencies):
    
    warnings.warn('%s has no equation specified' % var_name,
                  SyntaxWarning, stacklevel=2)

    # first arg is `self` reference
    return "functions.incomplete(%s)" % ', '.join(dependencies[1:]), []