#NEWLINE# def set_encoding( self , encoding ) : #NEWLINE# #INDENT# if ( encoding not in CHARSETS ) : #NEWLINE# #INDENT# raise ValueError ( 'Encoding not defined' ) #NEWLINE# #UNINDENT# self . _data [ 'encoding' ] = encoding #NEWLINE# return self