def cursor(self, index):
    if not isinstance(index, (int, long)):
      raise datastore_errors.BadArgumentError(
          'index argument should be entity_pb.Reference (%r)' % (index,))
    if not -self._skipped_results <= index <= len(self.__results):
      raise datastore_errors.BadArgumentError(
          'index argument must be in the inclusive range [%d, %d]' %
          (-self._skipped_results, len(self.__results)))

    if index == len(self.__results):
      return self.__end_cursor
    elif index == -self._skipped_results:
      return self.__start_cursor
    else:
      return self.__start_cursor.advance(index + self._skipped_results,
                                         self._batch_shared.query,
                                         self._batch_shared.conn)
Create a new POP3_TLS.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/datastore/datastore_query.py/Batch.cursor--crossover with--dataset/ETHPy150Open CollabQ/CollabQ/vendor/gdata/tlslite/integration/POP3_TLS.py/POP3_TLS.__init__