#NEWLINE# def write( self , data ) : #NEWLINE# #INDENT# if ( not data ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( type ( data ) is not str ) : #NEWLINE# #INDENT# raise TypeError ( ( 'data must be a string, not %r' % ( type ( data ) , ) ) ) #NEWLINE# #UNINDENT# self . buffer . append ( data )