(self, nameTuple: Sequence[str], desc: str, specGiven: ArgSpecGiven,
                      parent: Topic = None)
return newTopicObj
Actual topic creation step. Adds new Topic instance to topic map,
        and sends notification message (see ``Publisher.addNotificationMgr()``)
        regarding topic creation.
Actual topic creation step. Adds new Topic instance to topic map,
        and sends notification message (see ``Publisher.addNotificationMgr()``)
        regarding topic creation.
Actual topic creation step . Adds new Topic instance to topic map and sends notification message ( see Publisher . addNotificationMgr () ) regarding topic creation .
def __createTopic(self, nameTuple: Sequence[str], desc: str, specGiven: ArgSpecGiven,
                      parent: Topic = None) -> Topic:
        """
        Actual topic creation step. Adds new Topic instance to topic map,
        and sends notification message (see ``Publisher.addNotificationMgr()``)
        regarding topic creation.
        """
        if specGiven is None:
            specGiven = ArgSpecGiven()
        parentAI = None
        if parent:
            parentAI = parent._getListenerSpec()
        argsInfo = ArgsInfo(nameTuple, specGiven, parentAI)
        if (self.__treeConfig.raiseOnTopicUnspecified
            and not argsInfo.isComplete()):
            raise TopicDefnError(nameTuple)

        newTopicObj = Topic(self.__treeConfig, nameTuple, desc,
                            argsInfo, parent=parent)
        # sanity checks:
        assert newTopicObj.getName() not in self._topicsMap
        if parent is self.__allTopics:
            assert len(newTopicObj.getNameTuple()) == 1
        else:
            assert parent.getNameTuple() == newTopicObj.getNameTuple()[:-1]
        assert nameTuple == newTopicObj.getNameTuple()

        # store new object and notify of creation
        self._topicsMap[newTopicObj.getName()] = newTopicObj
        self.__treeConfig.notificationMgr.notifyNewTopic(
            newTopicObj, desc, specGiven.reqdArgs, specGiven.argsDocs)

        return newTopicObj
def __createTopic ( self , nameTuple : Sequence [ str ] , desc : str , specGiven : ArgSpecGiven , parent : Topic = None ) -> Topic : if specGiven is None : specGiven = ArgSpecGiven ( ) parentAI = None if parent : parentAI = parent . _getListenerSpec ( ) argsInfo = ArgsInfo ( nameTuple , specGiven , parentAI ) if ( self . __treeConfig . raiseOnTopicUnspecified and not argsInfo . isComplete ( ) ) : raise TopicDefnError ( nameTuple ) newTopicObj = Topic ( self . __treeConfig , nameTuple , desc , argsInfo , parent = parent ) # sanity checks: assert newTopicObj . getName ( ) not in self . _topicsMap if parent is self . __allTopics : assert len ( newTopicObj . getNameTuple ( ) ) == 1 else : assert parent . getNameTuple ( ) == newTopicObj . getNameTuple ( ) [ : - 1 ] assert nameTuple == newTopicObj . getNameTuple ( ) # store new object and notify of creation self . _topicsMap [ newTopicObj . getName ( ) ] = newTopicObj self . __treeConfig . notificationMgr . notifyNewTopic ( newTopicObj , desc , specGiven . reqdArgs , specGiven . argsDocs ) return newTopicObj