# Path: anytree/node/symlinknodemixin.py
# class SymlinkNodeMixin(NodeMixin):
#     u"""
#     The :any:`SymlinkNodeMixin` class extends any Python class to a symbolic link to a tree node.
# 
#     The class **MUST** have a `target` attribute refering to another tree node.
#     The :any:`SymlinkNodeMixin` class has its own parent and its own child nodes.
#     All other attribute accesses are just forwarded to the target node.
#     A minimal implementation looks like (see :any:`SymlinkNode` for a full implemenation):
# 
#     >>> from anytree import SymlinkNodeMixin, Node, RenderTree
#     >>> class SymlinkNode(SymlinkNodeMixin):
#     ...     def __init__(self, target, parent=None, children=None):
#     ...         self.target = target
#     ...         self.parent = parent
#     ...         if children:
#     ...             self.children = children
#     ...     def __repr__(self):
#     ...         return "SymlinkNode(%r)" % (self.target)
# 
#     >>> root = Node("root")
#     >>> s1 = Node("sub1", parent=root)
#     >>> l = SymlinkNode(s1, parent=root)
#     >>> l0 = Node("l0", parent=l)
#     >>> print(RenderTree(root))
#     Node('/root')
#     ├── Node('/root/sub1')
#     └── SymlinkNode(Node('/root/sub1'))
#         └── Node('/root/sub1/l0')
# 
#     Any modifications on the target node are also available on the linked node and vice-versa:
# 
#     >>> s1.foo = 4
#     >>> s1.foo
#     4
#     >>> l.foo
#     4
#     >>> l.foo = 9
#     >>> s1.foo
#     9
#     >>> l.foo
#     9
#     """
# 
#     def __getattr__(self, name):
#         if name in ('_NodeMixin__parent', '_NodeMixin__children'):
#             return super(SymlinkNodeMixin, self).__getattr__(name)
#         else:
#             return getattr(self.target, name)
# 
#     def __setattr__(self, name, value):
#         if name in ('_NodeMixin__parent', '_NodeMixin__children', 'parent', 'children', 'target'):
#             super(SymlinkNodeMixin, self).__setattr__(name, value)
#         else:
#             return setattr(self.target, name, value)
# 
# Path: anytree/node/util.py
# def _repr(node, args=None, nameblacklist=None):
#     classname = node.__class__.__name__
#     args = args or []
#     nameblacklist = nameblacklist or []
#     for key, value in filter(lambda item: not item[0].startswith("_") and item[0] not in nameblacklist,
#                              sorted(node.__dict__.items(),
#                                     key=lambda item: item[0])):
#         args.append("%s=%r" % (key, value))
#     return "%s(%s)" % (classname, ", ".join(args))


from .symlinknodemixin import SymlinkNodeMixin
from .util import _repr
        u"""
        Tree node which references to another tree node.

        Args:
            target: Symbolic Link Target. Another tree node, which is refered to.

        Keyword Args:
            parent: Reference to parent node.
            children: Iterable with child nodes.
            *: Any other given attribute is just stored as attribute **in** `target`.

        The :any:`SymlinkNode` has its own parent and its own child nodes.
        All other attribute accesses are just forwarded to the target node.

        >>> from anytree import SymlinkNode, Node, RenderTree
        >>> root = Node("root")
        >>> s1 = Node("sub1", parent=root, bar=17)
        >>> l = SymlinkNode(s1, parent=root, baz=18)
        >>> l0 = Node("l0", parent=l)
        >>> print(RenderTree(root))
        Node('/root')
        ├── Node('/root/sub1', bar=17, baz=18)
        └── SymlinkNode(Node('/root/sub1', bar=17, baz=18))
            └── Node('/root/sub1/l0')

        Any modifications on the target node are also available on the linked node and vice-versa:

        >>> s1.foo = 4
        >>> s1.foo
        4

# Path: anytree/node/symlinknodemixin.py
# class SymlinkNodeMixin(NodeMixin):
#     u"""
#     The :any:`SymlinkNodeMixin` class extends any Python class to a symbolic link to a tree node.
# 
#     The class **MUST** have a `target` attribute refering to another tree node.
#     The :any:`SymlinkNodeMixin` class has its own parent and its own child nodes.
#     All other attribute accesses are just forwarded to the target node.
#     A minimal implementation looks like (see :any:`SymlinkNode` for a full implemenation):
# 
#     >>> from anytree import SymlinkNodeMixin, Node, RenderTree
#     >>> class SymlinkNode(SymlinkNodeMixin):
#     ...     def __init__(self, target, parent=None, children=None):
#     ...         self.target = target
#     ...         self.parent = parent
#     ...         if children:
#     ...             self.children = children
#     ...     def __repr__(self):
#     ...         return "SymlinkNode(%r)" % (self.target)
# 
#     >>> root = Node("root")
#     >>> s1 = Node("sub1", parent=root)
#     >>> l = SymlinkNode(s1, parent=root)
#     >>> l0 = Node("l0", parent=l)
#     >>> print(RenderTree(root))
#     Node('/root')
#     ├── Node('/root/sub1')
#     └── SymlinkNode(Node('/root/sub1'))
#         └── Node('/root/sub1/l0')
# 
#     Any modifications on the target node are also available on the linked node and vice-versa:
# 
#     >>> s1.foo = 4
#     >>> s1.foo
#     4
#     >>> l.foo
#     4
#     >>> l.foo = 9
#     >>> s1.foo
#     9
#     >>> l.foo
#     9
#     """
# 
#     def __getattr__(self, name):
#         if name in ('_NodeMixin__parent', '_NodeMixin__children'):
#             return super(SymlinkNodeMixin, self).__getattr__(name)
#         else:
#             return getattr(self.target, name)
# 
#     def __setattr__(self, name, value):
#         if name in ('_NodeMixin__parent', '_NodeMixin__children', 'parent', 'children', 'target'):
#             super(SymlinkNodeMixin, self).__setattr__(name, value)
#         else:
#             return setattr(self.target, name, value)
# 
# Path: anytree/node/util.py
# def _repr(node, args=None, nameblacklist=None):
#     classname = node.__class__.__name__
#     args = args or []
#     nameblacklist = nameblacklist or []
#     for key, value in filter(lambda item: not item[0].startswith("_") and item[0] not in nameblacklist,
#                              sorted(node.__dict__.items(),
#                                     key=lambda item: item[0])):
#         args.append("%s=%r" % (key, value))
#     return "%s(%s)" % (classname, ", ".join(args))


# Path: anytree/node/symlinknode.py
from .symlinknodemixin import SymlinkNodeMixin
from .util import _repr

        u"""
        Tree node which references to another tree node.

        Args:
            target: Symbolic Link Target. Another tree node, which is refered to.

        Keyword Args:
            parent: Reference to parent node.
            children: Iterable with child nodes.
            *: Any other given attribute is just stored as attribute **in** `target`.

        The :any:`SymlinkNode` has its own parent and its own child nodes.
        All other attribute accesses are just forwarded to the target node.

        >>> from anytree import SymlinkNode, Node, RenderTree
        >>> root = Node("root")
        >>> s1 = Node("sub1", parent=root, bar=17)
        >>> l = SymlinkNode(s1, parent=root, baz=18)
        >>> l0 = Node("l0", parent=l)
        >>> print(RenderTree(root))
        Node('/root')
        ├── Node('/root/sub1', bar=17, baz=18)
        └── SymlinkNode(Node('/root/sub1', bar=17, baz=18))
            └── Node('/root/sub1/l0')

        Any modifications on the target node are also available on the linked node and vice-versa:

        >>> s1.foo = 4
        >>> s1.foo
        4

        >>> l.foo