parameters: (cls, headers: str)
return_statement: return h
docstring: Returns a dictionary from HTTP header text.
  
          >>> h = HTTPHeaders.parse("Content-Type: text/html\\r\\nContent-Length: 42\\r\\n")
          >>> sorted(h.items())
          [('Content-Length', '42'), ('Content-Type', 'text/html')]
  
          .. versionchanged:: 5.1
  
             Raises `HTTPInputError` on malformed headers instead of a
             mix of `KeyError`, and `ValueError`.
docstring_summary: Returns a dictionary from HTTP header text.
docstring_tokens: Returns a dictionary from HTTP header text .
function: def parse(cls, headers: str) -> "HTTPHeaders":
          """Returns a dictionary from HTTP header text.
  
          >>> h = HTTPHeaders.parse("Content-Type: text/html\\r\\nContent-Length: 42\\r\\n")
          >>> sorted(h.items())
          [('Content-Length', '42'), ('Content-Type', 'text/html')]
  
          .. versionchanged:: 5.1
  
             Raises `HTTPInputError` on malformed headers instead of a
             mix of `KeyError`, and `ValueError`.
  
          """
          h = cls()
          # RFC 7230 section 3.5: a recipient MAY recognize a single LF as a line
          # terminator and ignore any preceding CR.
          for line in headers.split("\n"):
              if line.endswith("\r"):
                  line = line[:-1]
              if line:
                  h.parse_line(line)
          return h
function_tokens: def parse ( cls , headers : str ) -> "HTTPHeaders" : h = cls ( ) # RFC 7230 section 3.5: a recipient MAY recognize a single LF as a line # terminator and ignore any preceding CR. for line in headers . split ( "\n" ) : if line . endswith ( "\r" ) : line = line [ : - 1 ] if line : h . parse_line ( line ) return h