#NEWLINE# def remove_socket( self , s ) : #NEWLINE# #INDENT# 'Remove a watched socket.' #NEWLINE# with self . _lock : #NEWLINE# #INDENT# self . _file_descriptors = self . _file_descriptors . difference ( [ s . fileno ( ) ] ) #NEWLINE# new_file_descriptor_to_callback = self . _file_descriptor_to_callback . copy ( ) #NEWLINE# del new_file_descriptor_to_callback [ s . fileno ( ) ] #NEWLINE# self . _file_descriptor_to_callback = s