'An iterator of changelog updates from a commit message in the form (category, message)'

def change_items(self, message):

    for line in message.split(u'\n'):
        for cat_match in re.finditer(u'\\[(\\w+)\\]', line):
            found_cat = self.cat_lookup(cat_match.group(1))
            if found_cat:
                line = line.replace(cat_match.group(0), u'').strip()
                (yield (found_cat, line))
