Helper method to avoid call get_variable for every variable.
766899
def import_variables(self, container, varnames=None):
        """"""
        if varnames is None:
            for keyword in self.tkvariables:
                setattr(container, keyword, self.tkvariables[keyword])
        else:
            for keyword in varnames:
                if keyword in self.tkvariables:
                    setattr(container, keyword, self.tkvariables[keyword])
1056628
def _general_getattr(self, var):
        """"""
        if getattr(self, "_%s__%s" % (self.__class__.__name__, var)) is None \
           and not self.__loaded:
            self._load_properties()
        return getattr(self, "_%s__%s" % (self.__class__.__name__, var))
527711
def _get_value(self, var):
        """"""
        return self._problem._cp.solution.get_values(
            self._problem._variables[var])
374407
def bound_variables(xmrs):
    """"""
    bvs = set(
        ep.intrinsic_variable for ep in xmrs.eps()
        if ep.is_quantifier() and ep.intrinsic_variable is not None
    )
    return sorted(bvs, key=var_id)
208237
def CaptureVariable(self, value, depth, limits, can_enqueue=True):
    """"""
    try:
      return self.CaptureVariableInternal(value, depth, limits, can_enqueue)
    except BaseException as e:  # pylint: disable=broad-except
      return {
          'status': {
              'isError': True,
              'refersTo': 'VARIABLE_VALUE',
              'description': {
                  'format': ('Failed to capture variable: $0'),
                  'parameters': [str(e)]
              }
          }
      }
486529
def all_names(self):
        """"""
        return [
            _get_variable_names(arr) if not isinstance(arr, ArrayList) else
            arr.all_names
            for arr in self]
580963
def remove(self, variables: Union[Iterable[str], Dict[str, str]]=None):
        
        keys = list(variables.keys()) if isinstance(variables, Dict) else variables     # type: Iterable[str]
        for key in keys:
            variable = self._project.variables.get(key)
            if isinstance(variables, Dict):
                if variables[key] != variable.value:
                    continue
            variable.delete()
1147445
function unsetLocalVariables()
    {
        foreach ( $this->CurrentLocalVariablesNames as $ns => $vars )
        {
            foreach ( $vars as $var => $val )
                $this->unsetLocalVariable( $var, $ns );
        }
    }
488690
def get_variables
      return unless File.exists?(ENV_FILE)

      File.open(ENV_FILE).each do |line|
        var_name = line.split("=").first
        yield var_name unless line =~ /^\#/
      end
    end
296626
def get_variable_str(self):
        
        if self.var_name is None:
            prefix = ''
        else:
            prefix = self.var_name

        suffix = str(self.var_value)
        if len(suffix) == 0:
            suffix = "''"
        elif len(suffix) > self.__max_str_length_displayed__:
            suffix = ''

        if len(prefix) > 0 and len(suffix) > 0:
            return prefix + '=' + suffix
        else:
            return prefix + suffix
671168
def load_vars(opt):
    """"""
    if not hasattr(opt, '_vars_cache'):
        cli_opts = cli_hash(opt.extra_vars)
        setattr(opt, '_vars_cache',
                merge_dicts(load_var_files(opt, cli_opts), cli_opts))

    return getattr(opt, '_vars_cache')
319211
def variables(self):
        """"""
        variables = set([])
        for node in self.nodes:
            variables.add(node.variable)
        return sorted(variables)
92305
def request_get_variable(self, py_db, seq, thread_id, frame_id, scope, attrs):
        '''
        
        '''
        int_cmd = InternalGetVariable(seq, thread_id, frame_id, scope, attrs)
        py_db.post_internal_command(int_cmd, thread_id)
834462
def call_fget(self, obj) -> Any:
        """"""
        custom = vars(obj).get(self.name)
        if custom is None:
            return self.fget(obj)
        return custom
726741
public final Variable getVariable(int variableNum) {
    int index = getVariableIndex(variableNum);
    if (index >= 0) {
      return vars[index];
    } else {
      return null;
    }
  }
656853
def _get_value(self, variable):
        """"""
        return swiglpk.glp_mip_col_val(
            self._problem._p, self._problem._variables[variable])
108863
def _get_value(self, var):
        """"""
        return self._problem._p.get_value(self._problem._variables[var])