def __iter__(self):
    '''The cursor itself is the iterator. Note that it cannot be used twice,
    and once iteration starts, the cursor cannot be modified.
    '''
    if self._iterator:
      raise RuntimeError('Attempt to iterate over Cursor twice.')

    self._iterator = iter(self._iterable)
    return self
def __iter__ ( self ) : if self . _iterator : raise RuntimeError ( 'Attempt to iterate over Cursor twice.' ) self . _iterator = iter ( self . _iterable ) return self
The cursor itself is the iterator. Note that it cannot be used twice,
    and once iteration starts, the cursor cannot be modified.