(self, fileobj)
Return the key associated to a registered file object.

        Returns:
        SelectorKey for this file object
Return the key associated to a registered file object.
Return the key associated to a registered file object .
def get_key(self, fileobj):
        """Return the key associated to a registered file object.

        Returns:
        SelectorKey for this file object
        """
        mapping = self.get_map()
        if mapping is None:
            raise RuntimeError('Selector is closed')
        try:
            return mapping[fileobj]
        except KeyError:
            raise KeyError("{!r} is not registered".format(fileobj)) from None
def get_key ( self , fileobj ) : mapping = self . get_map ( ) if mapping is None : raise RuntimeError ( 'Selector is closed' ) try : return mapping [ fileobj ] except KeyError : raise KeyError ( "{!r} is not registered" . format ( fileobj ) ) from None