def itervalues(self, collect=False):
        """ Iterate through the values in this list. If `collect` is True,
        yield a list of values for each unique key.

        >>> kvl = KeyValueList([('red', 'rose'), ('blue', 'sea'),
        ... ('green', 'grass'), ('blue', 'sky')])
        >>> for key in kvl.itervalues():
        ...     print(key)
        rose
        sea
        grass
        sky
        >>> for key in kvl.itervalues(collect=True):
        ...     print(key)
        ['rose']
        ['sea', 'sky']
        ['grass']

        """
        if collect:
            keys, values = [], []
            for k, v in self:
                try:
                    index = keys.index(k)
                except __HOLE__:
                    keys.append(k)
                    values.append([v])
                else:
                    values[index].append((v))
            for value in values:
                yield value
        else:
            for k, v in self:
                yield v
dataset/ETHPy150Open nigelsmall/httpstream/httpstream/kvlist.py/KeyValueList.itervalues