(self, codeloc, old, new)
Add a replacement record: Replacing expression `old` with `new` at program location `codeloc`.
        If the self._only_consts flag is set to true, only constant values will be set.

        :param CodeLocation codeloc:    The code location.
        :param old:                     The expression to be replaced.
        :param new:                     The expression to replace with.
        :return:                        None
Add a replacement record: Replacing expression `old` with `new` at program location `codeloc`.
        If the self._only_consts flag is set to true, only constant values will be set.
Add a replacement record : Replacing expression old with new at program location codeloc . If the self . _only_consts flag is set to true only constant values will be set .
def add_replacement(self, codeloc, old, new):
        """
        Add a replacement record: Replacing expression `old` with `new` at program location `codeloc`.
        If the self._only_consts flag is set to true, only constant values will be set.

        :param CodeLocation codeloc:    The code location.
        :param old:                     The expression to be replaced.
        :param new:                     The expression to replace with.
        :return:                        None
        """
        if self.is_top(new):
            return

        if self._only_consts:
            if isinstance(new, int) or self.is_top(new):
                self._replacements[codeloc][old] = new
        else:
            self._replacements[codeloc][old] = new
def add_replacement ( self , codeloc , old , new ) : if self . is_top ( new ) : return if self . _only_consts : if isinstance ( new , int ) or self . is_top ( new ) : self . _replacements [ codeloc ] [ old ] = new else : self . _replacements [ codeloc ] [ old ] = new