'Enable buffering.  Buffer `size` items before yielding them.'

def enable_buffering(self, size=5):

    if (size <= 1):
        raise ValueError('buffer    size    too    small')
    def generator(next):
        buf = []
        c_size = 0
        push = buf.append
        while 1:
            try:
                while (c_size < size):
                    c = next()
                    push(c)
                    if c:
                        c_size += 1
            except StopIteration:
                if (not c_size):
                    return
            (yield concat(buf))
            del buf[:]
            c_size = 0
    self.buffered = True
    self._next = generator(self._gen.next).next
