pypet/naturalnaming.py
def f_add_link(self, name_or_item, full_name_or_item=None):
        """Adds a link to an existing node.

        Can be called as ``node.f_add_link(other_node)`` this will add a link the `other_node`
        with the link name as the name of the node.

        Or can be called as ``node.f_add_link(name, other_node)`` to add a link to the
        `other_node` and the given `name` of the link.

        In contrast to addition of groups and leaves,  colon separated names
        are **not** allowed, i.e. ``node.f_add_link('mygroup.mylink', other_node)``
        does not work.

        """
        if isinstance(name_or_item, str):
            name = name_or_item
            if isinstance(full_name_or_item, str):
                instance = self.v_root.f_get(full_name_or_item)
            else:
                instance =  full_name_or_item
        else:
            instance = name_or_item
            name = instance.v_name

        return self._nn_interface._add_generic(self, type_name=LINK,
                                               group_type_name=GROUP, args=(name, instance),
                                               kwargs={},
                                               add_prefix=False)
def f_add_link(self, name_or_item, full_name_or_item=None):
        """Adds a link to an existing node.

        Can be called as ``node.f_add_link(other_node)`` this will add a link the `other_node`
        with the link name as the name of the node.

        Or can be called as ``node.f_add_link(name, other_node)`` to add a link to the
        `other_node` and the given `name` of the link.

        In contrast to addition of groups and leaves,  colon separated names
        are **not** allowed, i.e. ``node.f_add_link('mygroup.mylink', other_node)``
        does not work.

        """
        if isinstance(name_or_item, str):
            name = name_or_item
            if isinstance(full_name_or_item, str):
                instance = self.v_root.f_get(full_name_or_item)
            else:
                instance =  full_name_or_item
        else:
            instance = name_or_item
            name = instance.v_name

        return self._nn_interface._add_generic(self, type_name=LINK,
                                               group_type_name=GROUP, args=(name, instance),
                                               kwargs={},
                                               add_prefix=False)
Adds a link to an existing node.

        Can be called as ``node.f_add_link(other_node)`` this will add a link the `other_node`
        with the link name as the name of the node.

        Or can be called as ``node.f_add_link(name, other_node)`` to add a link to the
        `other_node` and the given `name` of the link.

        In contrast to addition of groups and leaves,  colon separated names
        are **not** allowed, i.e. ``node.f_add_link('mygroup.mylink', other_node)``
        does not work.