parameters: (self)
docstring: Generate key-to-(start, stop) table of contents.
docstring_summary: Generate key-to-(start, stop) table of contents.
docstring_tokens: Generate key - to - ( start stop ) table of contents .
function: def _generate_toc(self):
          """Generate key-to-(start, stop) table of contents."""
          starts, stops = [], []
          self._file.seek(0)
          next_pos = 0
          while True:
              line_pos = next_pos
              line = self._file.readline()
              next_pos = self._file.tell()
              if line.startswith('\001\001\001\001' + os.linesep):
                  starts.append(next_pos)
                  while True:
                      line_pos = next_pos
                      line = self._file.readline()
                      next_pos = self._file.tell()
                      if line == '\001\001\001\001' + os.linesep:
                          stops.append(line_pos - len(os.linesep))
                          break
                      elif line == '':
                          stops.append(line_pos)
                          break
              elif line == '':
                  break
          self._toc = dict(enumerate(zip(starts, stops)))
          self._next_key = len(self._toc)
          self._file.seek(0, 2)
          self._file_length = self._file.tell()
function_tokens: def _generate_toc ( self ) : starts , stops = [ ] , [ ] self . _file . seek ( 0 ) next_pos = 0 while True : line_pos = next_pos line = self . _file . readline ( ) next_pos = self . _file . tell ( ) if line . startswith ( '\001\001\001\001' + os . linesep ) : starts . append ( next_pos ) while True : line_pos = next_pos line = self . _file . readline ( ) next_pos = self . _file . tell ( ) if line == '\001\001\001\001' + os . linesep : stops . append ( line_pos - len ( os . linesep ) ) break elif line == '' : stops . append ( line_pos ) break elif line == '' : break self . _toc = dict ( enumerate ( zip ( starts , stops ) ) ) self . _next_key = len ( self . _toc ) self . _file . seek ( 0 , 2 ) self . _file_length = self . _file . tell ( )