parameters: (self, oldMethod, newFunction)
return_statement: return retFlag
docstring: This is only used by Finder.py - the module that lets
          you redefine functions with Control-c-Control-v
docstring_summary: This is only used by Finder.py - the module that lets
          you redefine functions with Control-c-Control-v
docstring_tokens: This is only used by Finder . py - the module that lets you redefine functions with Control - c - Control - v
function: def replaceMethod(self, oldMethod, newFunction):
          """
          This is only used by Finder.py - the module that lets
          you redefine functions with Control-c-Control-v
          """
          retFlag = 0
          for entry in list(self.__callbacks.items()):
              event, objectDict = entry
              for objectEntry in list(objectDict.items()):
                  object, params = objectEntry
                  method = params[0]
                  if isinstance(method, types.MethodType):
                      function = method.__func__
                  else:
                      function = method
                  #print ('function: ' + repr(function) + '\n' +
                  #       'method: ' + repr(method) + '\n' +
                  #       'oldMethod: ' + repr(oldMethod) + '\n' +
                  #       'newFunction: ' + repr(newFunction) + '\n')
                  if function == oldMethod:
                      newMethod = types.MethodType(newFunction, method.__self__)
                      params[0] = newMethod
                      # Found it retrun true
                      retFlag += 1
          # didn't find that method, return false
          return retFlag
function_tokens: def replaceMethod ( self , oldMethod , newFunction ) : retFlag = 0 for entry in list ( self . __callbacks . items ( ) ) : event , objectDict = entry for objectEntry in list ( objectDict . items ( ) ) : object , params = objectEntry method = params [ 0 ] if isinstance ( method , types . MethodType ) : function = method . __func__ else : function = method #print ('function: ' + repr(function) + '\n' + #       'method: ' + repr(method) + '\n' + #       'oldMethod: ' + repr(oldMethod) + '\n' + #       'newFunction: ' + repr(newFunction) + '\n') if function == oldMethod : newMethod = types . MethodType ( newFunction , method . __self__ ) params [ 0 ] = newMethod # Found it retrun true retFlag += 1 # didn't find that method, return false return retFlag