parameters: (self, n=-1)
return_statement: return bytes(b)
docstring: Read and return up to n bytes.
  
          Returns an empty bytes object on EOF, or None if the object is
          set not to block and has no data to read.
docstring_summary: Read and return up to n bytes.
docstring_tokens: Read and return up to n bytes .
function: def read(self, n=-1):
          """Read and return up to n bytes.
  
          Returns an empty bytes object on EOF, or None if the object is
          set not to block and has no data to read.
          """
          if n is None:
              n = -1
          if n < 0:
              return self.readall()
          b = bytearray(n.__index__())
          n = self.readinto(b)
          if n is None:
              return None
          del b[n:]
          return bytes(b)
function_tokens: def read ( self , n = - 1 ) : if n is None : n = - 1 if n < 0 : return self . readall ( ) b = bytearray ( n . __index__ ( ) ) n = self . readinto ( b ) if n is None : return None del b [ n : ] return bytes ( b )