def register_type(self, typename):
        """
        Registers a type name so that it may be used to send and receive packages.
        
        :param typename: Name of the packet type. A method with the same name and a
            "on_" prefix should be added to handle incomming packets.
            
        :raises ValueError: If there is a hash code collision.
        """ 
        typekey = typehash(typename)
        if typekey in self._type_register:
            raise ValueError("Type name collision. Type %s has the same hash." % repr(self._type_register[typekey]))
        self._type_register[typekey] = typename
def register_type(self, typename):
        """
        Registers a type name so that it may be used to send and receive packages.
        
        :param typename: Name of the packet type. A method with the same name and a
            "on_" prefix should be added to handle incomming packets.
            
        :raises ValueError: If there is a hash code collision.
        """ 
        typekey = typehash(typename)
        if typekey in self._type_register:
            raise ValueError("Type name collision. Type %s has the same hash." % repr(self._type_register[typekey]))
        self._type_register[typekey] = typename
def register_type ( self , typename ) : typekey = typehash ( typename ) if typekey in self . _type_register : raise ValueError ( "Type name collision. Type %s has the same hash." % repr ( self . _type_register [ typekey ] ) ) self . _type_register [ typekey ] = typename
Registers a type name so that it may be used to send and receive packages.
        
        :param typename: Name of the packet type. A method with the same name and a
            "on_" prefix should be added to handle incomming packets.
            
        :raises ValueError: If there is a hash code collision.
Registers a type name so that it may be used to send and receive packages . : param typename : Name of the packet type . A method with the same name and a on_ prefix should be added to handle incomming packets . : raises ValueError : If there is a hash code collision .