Make this variable an alias of another one
962262
def make_alias(self, entry):
        
        entry.add_alias(self)
        self.alias = entry
        self.scope = entry.scope  # Local aliases can be "global" (static)
        self.byref = entry.byref
        self.offset = entry.offset
        self.addr = entry.addr
520350
def _transform(self, var):
        '''  '''
        self.collection.variables.pop(var.name)
        return var.values
1125070
def acceptAlias(decoratedFunction):
    """"""
    def wrapper(self, *args, **kwargs):
        SubAssert(isinstance(self, AliasBase))

        if len(args) > 0:
            key = args[0]
            if args[0] in self._aliases.keys():
                key = self._aliases[args[0]]
            return decoratedFunction(self, key, *args[1:], **kwargs)
        return decoratedFunction(self, *args, **kwargs)
    return wrapper
1296120
def put_alias(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.put_alias(index=self._name, **kwargs)
608956
def _flat_alias(t):
    
    t.name = t.parsed_name
    t.alias = t.parsed_alias[0] if t.parsed_alias else ''
    return t
632047
def aliasstr(self):
		''''''
		return ', '.join(repr(self.ns + x) for x in self.aliases)
466724
def rename_get_variable(mapping):
    
    def custom_getter(getter, name, *args, **kwargs):
        splits = name.split('/')
        basename = splits[-1]
        if basename in mapping:
            basename = mapping[basename]
            splits[-1] = basename
            name = '/'.join(splits)
        return getter(name, *args, **kwargs)
    return custom_getter_scope(custom_getter)
1200201
public void alias( Object ...args ) {
        if( args.length % 2 == 1 )
            throw new RuntimeException("Even number of arguments expected");

        for (int i = 0; i < args.length; i += 2) {
            aliasGeneric( args[i], (String)args[i+1]);
        }
    }
775951
def Alias(self, alias):
        """"""
        # FIXME
        if self.generate_comments:
            self.print_comment(alias)
        print("%s = %s # alias" % (alias.name, alias.alias), file=self.stream)
        self._aliases += 1
        return
596773
def _merge_raw(self, other):
        """"""
        if other is None:
            variables = OrderedDict(self.variables)
        else:
            # don't align because we already called xarray.align
            variables = expand_and_merge_variables(
                [self.variables, other.variables])
        return variables
378438
def magic(self, alias):
        
        if alias in self.aliases:
            return self.aliases[alias]
        else:
            return "%%{}\n".format(alias)
1219267
def _generateAlias(self):
        """"""
        for i in range(1000):
            alias = 'cust%d' % (i, )
            if alias not in self.auth_level_aliases:
                return alias

        raise RuntimeError('Could not find an unused alias (tried 1000!)')
1131835
def emit_var_assign(self, var, t):
        
        p = '*' if var.byref else ''  # Indirection prefix
        if self.O_LEVEL > 1 and not var.accessed:
            return

        if not var.type_.is_basic:
            raise NotImplementedError()

        if var.scope == SCOPE.global_:
            self.emit('store' + self.TSUFFIX(var.type_), var.mangled, t)
        elif var.scope == SCOPE.parameter:
            self.emit('pstore' + self.TSUFFIX(var.type_), p + str(var.offset), t)
        elif var.scope == SCOPE.local:
            if var.alias is not None and var.alias.class_ == CLASS.array:
                var.offset -= 1 + 2 * var.alias.count
            self.emit('pstore' + self.TSUFFIX(var.type_), p + str(-var.offset), t)
82082
def add_alias(self, alias):
        
        objs = object_session(self)
        
        if isinstance(alias, list):
            raise NotImplementedError
        elif isinstanceofany(alias, (str, unicode)):
            a = SymbolAlias(self, alias)
            self.aliases.append(a)
            objs.add(a)
1144649
def set_alias(self, alias_hosted_zone_id, alias_dns_name):
        """"""
        self.alias_hosted_zone_id = alias_hosted_zone_id
        self.alias_dns_name = alias_dns_name
331729
def substitute_variables(command, level, name, value, target=None, **kwargs):
    """"""
    rule = kwargs.get('rule', {})
    rule_value = rule.get('value', '') if rule else ''
    substitutes = {
        '${level}': str(level),
        '${target}': str(target),
        '${name}': '"' + str(name) + '"',
        '${value}': str(value),
        '${limit_value}': str(rule_value),
    }

    result = command
    for pattern, value in substitutes.items():
        result = result.replace(pattern, value)

    return result
138480
def get_local_variable_from_name(self, variable_name):
        
        return next((v for v in self.variables if v.name == variable_name), None)