parameters: (self, size=None)
return_statement: return buf
docstring: Read at most size bytes from the file. If size is not
             present or None, read all data until EOF is reached.
docstring_summary: Read at most size bytes from the file. If size is not
             present or None, read all data until EOF is reached.
docstring_tokens: Read at most size bytes from the file . If size is not present or None read all data until EOF is reached .
function: def read(self, size=None):
          """Read at most size bytes from the file. If size is not
             present or None, read all data until EOF is reached.
          """
          if self.closed:
              raise ValueError("I/O operation on closed file")
  
          buf = b""
          if self.buffer:
              if size is None:
                  buf = self.buffer
                  self.buffer = b""
              else:
                  buf = self.buffer[:size]
                  self.buffer = self.buffer[size:]
  
          if size is None:
              buf += self.fileobj.read()
          else:
              buf += self.fileobj.read(size - len(buf))
  
          self.position += len(buf)
          return buf
function_tokens: def read ( self , size = None ) : if self . closed : raise ValueError ( "I/O operation on closed file" ) buf = b"" if self . buffer : if size is None : buf = self . buffer self . buffer = b"" else : buf = self . buffer [ : size ] self . buffer = self . buffer [ size : ] if size is None : buf += self . fileobj . read ( ) else : buf += self . fileobj . read ( size - len ( buf ) ) self . position += len ( buf ) return buf