(self, topicName: str)
return parentObj
This will find which parents need to be created such that
        topicName can be created (but doesn't create given topic),
        and creates them. Returns the parent object.
This will find which parents need to be created such that
        topicName can be created (but doesn't create given topic),
        and creates them. Returns the parent object.
This will find which parents need to be created such that topicName can be created ( but doesn t create given topic ) and creates them . Returns the parent object .
def __createParentTopics(self, topicName: str) -> Topic:
        """
        This will find which parents need to be created such that
        topicName can be created (but doesn't create given topic),
        and creates them. Returns the parent object.
        """
        assert self.getTopic(topicName, okIfNone=True) is None
        parentObj, subtopicNames = self.__getClosestParent(stringize(topicName))

        # will create subtopics of parentObj one by one from subtopicNames
        if parentObj is self.__allTopics:
            nextTopicNameList = []
        else:
            nextTopicNameList = list(parentObj.getNameTuple())
        for name in subtopicNames[:-1]:
            nextTopicNameList.append(name)
            desc, specGiven = self.__defnProvider.getDefn(tuple(nextTopicNameList))
            if desc is None:
                desc = 'UNDOCUMENTED: created as parent without specification'
            parentObj = self.__createTopic(tuple(nextTopicNameList),
                                           desc, specGiven=specGiven, parent=parentObj)

        return parentObj
def __createParentTopics ( self , topicName : str ) -> Topic : assert self . getTopic ( topicName , okIfNone = True ) is None parentObj , subtopicNames = self . __getClosestParent ( stringize ( topicName ) ) # will create subtopics of parentObj one by one from subtopicNames if parentObj is self . __allTopics : nextTopicNameList = [ ] else : nextTopicNameList = list ( parentObj . getNameTuple ( ) ) for name in subtopicNames [ : - 1 ] : nextTopicNameList . append ( name ) desc , specGiven = self . __defnProvider . getDefn ( tuple ( nextTopicNameList ) ) if desc is None : desc = 'UNDOCUMENTED: created as parent without specification' parentObj = self . __createTopic ( tuple ( nextTopicNameList ) , desc , specGiven = specGiven , parent = parentObj ) return parentObj