def __next__ ( self ) : res = self . _head self . _fill ( ) if res is None : raise StopIteration ( ) return res
python iter has no next
Pop the head off the iterator and return it .
def __next__(self):
    """Pop the head off the iterator and return it."""
    res = self._head
    self._fill()
    if res is None:
      raise StopIteration()
    return res