def __setitem__(self, name, value):
        if name.startswith('_Macros'):
            dict.__setitem__(self, name, value)
            return
        # '.' in name reserved for getting alternative representations
        if '.' in name:
            raise MacroError, 'name "%s" contains illegal character: "."' % name
        if self.__track:
            self.__tracked[name] = 1
        # only expand references to ourself
        d = {name: self.get(name)}
        # escape any macros in the new value
        value = value.replace('%', '%%')
        # unescape references to ourself
        value = value.replace('%%%%(%s)s' %name, '%%(%s)s'%name)
        # expand our old value when defining the new value
        dict.__setitem__(self, name, value % d)

    # overrides allow you to set a macro value at the command line
    # or in a config file and use it despite the value being
    # set subsequently within the recipe
dataset/ETHPy150Open sassoftware/conary/conary/build/macros.py/Macros.__setitem__/original