def addBinding(self, loc, value, reportRedef=True):
        '''Called when a binding is altered.

        - `loc` is the location (an object with lineno and optionally
          col_offset attributes) of the statement responsible for the change
        - `value` is the optional new value, a Binding instance, associated
          with the binding; if None, the binding is deleted if it exists.
        - if `reportRedef` is True (default), rebinding while unused will be
          reported.
        '''
        if (isinstance(self.scope.get(value.name), FunctionDefinition)
                    and isinstance(value, FunctionDefinition)):
            if not value._property_decorator:
                if not self.differentForks(loc, self.scope[value.name].source):
                    self.report(messages.RedefinedFunction,
                            loc, value.name, self.scope[value.name].source)

        if not isinstance(self.scope, ClassScope):
            for scope in self.scopeStack[::-1]:
                existing = scope.get(value.name)
                if (isinstance(existing, Importation)
                        and not existing.used
                        and (not isinstance(value, Importation) or value.fullName == existing.fullName)
                        and reportRedef):

                    if not self.differentForks(loc, existing.source):
                        self.report(messages.RedefinedWhileUnused,
                                loc, value.name, existing.source)

        if isinstance(value, UnBinding):
            try:
                del self.scope[value.name]
            except __HOLE__:
                self.report(messages.UndefinedName, loc, value.name)
        else:
            self.scope[value.name] = value
dataset/ETHPy150Open kevinw/pyflakes/pyflakes/checker.py/Checker.addBinding