'Facilitate iteration over epochs.
Notes
This enables the use of this Python pattern::
>>> for epoch in epochs:  # doctest: +SKIP
>>>     print(epoch)  # doctest: +SKIP
Where ``epoch`` is given by successive outputs of
:func:`mne.Epochs.next`.'

def __iter__(self):

    self._current = 0
    while True:
        x = self.next()
        if (x is None):
            return
        (yield x)
