(self, namespace_handler)
Register a namespace handler object.

        :param namespace_handler: An instance of a :class:`Namespace`
                                  subclass that handles all the event traffic
                                  for a namespace.
Register a namespace handler object.
Register a namespace handler object .
def register_namespace(self, namespace_handler):
        """Register a namespace handler object.

        :param namespace_handler: An instance of a :class:`Namespace`
                                  subclass that handles all the event traffic
                                  for a namespace.
        """
        if not isinstance(namespace_handler, namespace.ClientNamespace):
            raise ValueError('Not a namespace instance')
        if self.is_asyncio_based() != namespace_handler.is_asyncio_based():
            raise ValueError('Not a valid namespace class for this client')
        namespace_handler._set_client(self)
        self.namespace_handlers[namespace_handler.namespace] = \
            namespace_handler
def register_namespace ( self , namespace_handler ) : if not isinstance ( namespace_handler , namespace . ClientNamespace ) : raise ValueError ( 'Not a namespace instance' ) if self . is_asyncio_based ( ) != namespace_handler . is_asyncio_based ( ) : raise ValueError ( 'Not a valid namespace class for this client' ) namespace_handler . _set_client ( self ) self . namespace_handlers [ namespace_handler . namespace ] = namespace_handler