#NEWLINE# def register( self , fileobj , events , data = None ) : #NEWLINE# #INDENT# key = super ( KqueueSelector , self ) . register ( fileobj , events , data ) #NEWLINE# if ( events & EVENT_READ ) : #NEWLINE# #INDENT# kev = select . kevent ( key . fd , select . KQ_FILTER_READ , select . KQ_EV_ADD ) #NEWLINE# self . _kqueue . control ( [ kev ] , 0 , 0 ) #NEWLINE# #UNINDENT# if ( events & EVENT_WRITE ) : #NEWLINE# #INDENT# kev = select . kevent ( key . fd , select . KQ_FILTER_WRITE , select . KQ_EV_ADD ) #NEWLINE# self . _kqueue . control ( [ kev ] , 0 , 0 ) #NEWLINE# #UNINDENT# return key