pypet/naturalnaming.py
def _create_link(self, act_node, name, instance):
        """Creates a link and checks if names are appropriate
        """

        act_node._links[name] = instance
        act_node._children[name] = instance

        full_name = instance.v_full_name
        if full_name not in self._root_instance._linked_by:
            self._root_instance._linked_by[full_name] = {}
        linking = self._root_instance._linked_by[full_name]
        if act_node.v_full_name not in linking:
            linking[act_node.v_full_name] = (act_node, set())
        linking[act_node.v_full_name][1].add(name)

        if name not in self._links_count:
            self._links_count[name] = 0
        self._links_count[name] = self._links_count[name] + 1

        self._logger.debug('Added link `%s` under `%s` pointing '
                           'to `%s`.' % (name, act_node.v_full_name,
                                         instance.v_full_name))
        return instance
def _create_link(self, act_node, name, instance):
        """Creates a link and checks if names are appropriate
        """

        act_node._links[name] = instance
        act_node._children[name] = instance

        full_name = instance.v_full_name
        if full_name not in self._root_instance._linked_by:
            self._root_instance._linked_by[full_name] = {}
        linking = self._root_instance._linked_by[full_name]
        if act_node.v_full_name not in linking:
            linking[act_node.v_full_name] = (act_node, set())
        linking[act_node.v_full_name][1].add(name)

        if name not in self._links_count:
            self._links_count[name] = 0
        self._links_count[name] = self._links_count[name] + 1

        self._logger.debug('Added link `%s` under `%s` pointing '
                           'to `%s`.' % (name, act_node.v_full_name,
                                         instance.v_full_name))
        return instance
Creates a link and checks if names are appropriate