parameters: (self)
return_statement: return not eof
docstring: Read and decode the next chunk of data from the BufferedReader.
docstring_summary: Read and decode the next chunk of data from the BufferedReader.
docstring_tokens: Read and decode the next chunk of data from the BufferedReader .
function: def _read_chunk(self):
          """
          Read and decode the next chunk of data from the BufferedReader.
          """
  
          # The return value is True unless EOF was reached.  The decoded
          # string is placed in self._decoded_chars (replacing its previous
          # value).  The entire input chunk is sent to the decoder, though
          # some of it may remain buffered in the decoder, yet to be
          # converted.
  
          if self._decoder is None:
              raise ValueError("no decoder")
  
          if self._telling:
              # To prepare for tell(), we need to snapshot a point in the
              # file where the decoder's input buffer is empty.
  
              dec_buffer, dec_flags = self._decoder.getstate()
              # Given this, we know there was a valid snapshot point
              # len(dec_buffer) bytes ago with decoder state (b'', dec_flags).
  
          # Read a chunk, decode it, and put the result in self._decoded_chars.
          input_chunk = self.buffer.read1(self._CHUNK_SIZE)
          eof = not input_chunk
          self._set_decoded_chars(self._decoder.decode(input_chunk, eof))
  
          if self._telling:
              # At the snapshot point, len(dec_buffer) bytes before the read,
              # the next input to be decoded is dec_buffer + input_chunk.
              self._snapshot = (dec_flags, dec_buffer + input_chunk)
  
          return not eof
function_tokens: def _read_chunk ( self ) : # The return value is True unless EOF was reached.  The decoded # string is placed in self._decoded_chars (replacing its previous # value).  The entire input chunk is sent to the decoder, though # some of it may remain buffered in the decoder, yet to be # converted. if self . _decoder is None : raise ValueError ( "no decoder" ) if self . _telling : # To prepare for tell(), we need to snapshot a point in the # file where the decoder's input buffer is empty. dec_buffer , dec_flags = self . _decoder . getstate ( ) # Given this, we know there was a valid snapshot point # len(dec_buffer) bytes ago with decoder state (b'', dec_flags). # Read a chunk, decode it, and put the result in self._decoded_chars. input_chunk = self . buffer . read1 ( self . _CHUNK_SIZE ) eof = not input_chunk self . _set_decoded_chars ( self . _decoder . decode ( input_chunk , eof ) ) if self . _telling : # At the snapshot point, len(dec_buffer) bytes before the read, # the next input to be decoded is dec_buffer + input_chunk. self . _snapshot = ( dec_flags , dec_buffer + input_chunk ) return not eof