#NEWLINE# def __init__( self , sock , mode ) : #NEWLINE# #INDENT# if ( mode not in ( 'r' , 'w' , 'rw' , 'rb' , 'wb' , 'rwb' ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'invalid mode: %r' % mode ) ) #NEWLINE# #UNINDENT# io . RawIOBase . __init__ ( self ) #NEWLINE# self . _sock = sock #NEWLINE# if ( 'b' not in mode ) : #NEWLINE# #INDENT# mode += 'b' #NEWLINE# #UNINDENT# self . _mode = mode #NEWLINE# self . _reading = ( 'r' in mode ) #NEWLINE# self . _writing = ( 'w' in mode ) #NEWLINE# self . _timeout_occurred = False