'works out the updates to be performed'

def _analyze(self):

    if ((self.value is None) or (self.value == self.previous)):
        pass
    elif (self._operation == 'append'):
        self._append = self.value
    elif (self._operation == 'prepend'):
        self._prepend = self.value
    elif (self.previous is None):
        self._assignments = self.value
    elif (len(self.value) < len(self.previous)):
        self._assignments = self.value
    elif (len(self.previous) == 0):
        self._assignments = self.value
    else:
        search_space = (len(self.value) - max(0, (len(self.previous) - 1)))
        search_size = len(self.previous)
        for i in range(search_space):
            j = (i + search_size)
            sub = self.value[i:j]
            idx_cmp = (lambda idx: (self.previous[idx] == sub[idx]))
            if (idx_cmp(0) and idx_cmp((-1)) and (self.previous == sub)):
                self._prepend = (self.value[:i] or None)
                self._append = (self.value[j:] or None)
                break
        if (self._prepend is self._append is None):
            self._assignments = self.value
    self._analyzed = True
