'Change a registered file object monitored events or attached data.
Parameters:
fileobj -- file object or file descriptor
events  -- events to monitor (bitwise mask of EVENT_READ|EVENT_WRITE)
data    -- attached data
Returns:
SelectorKey instance
Raises:
Anything that unregister() or register() raises'

def modify(self, fileobj, events, data=None):

    self.unregister(fileobj)
    return self.register(fileobj, events, data)
