#NEWLINE# def set_headers( self , headers ) : #NEWLINE# #INDENT# 'Set several headers at once.\n\n        Warning:\n            Calling this method overwrites existing values, if any.\n\n        Args:\n            headers (dict or list): A dictionary of header names and values\n                to set, or a ``list`` of (*name*, *value*) tuples. Both *name*\n                and *value* must be of type ``str`` or ``StringType`` and\n                contain only ISO-8859-1 characters. Under Python 2.x, the\n                ``unicode`` type is also accepted, although such strings are\n                also limited to ISO-8859-1.\n\n                Note:\n                    Falcon can process a list of tuples slightly faster\n                    than a dict.\n\n        Raises:\n            ValueError: `headers` was not a ``dict`` or ``list`` of ``tuple``.\n\n        ' #NEWLINE# if isinstance ( headers , dict ) : #NEWLINE# #INDENT# headers = headers . items ( ) #NEWLINE# #UNINDENT# _headers = self . _headers #NEWLINE# for ( name , value ) in headers : #NEWLINE# #INDENT# ( name , value ) = self . _encode_header ( name , value ) #NEWLINE# _headers [ name . lower ( ) ] = value