Python Forum
anytree implicit node? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: anytree implicit node? (/thread-27464.html)



anytree implicit node? - gw1500se - Jun-07-2020

I have a weird problem with anytree. I defined a node thus:
Node(str(sensor.target),parent=tgt,index=0,action='target')
Note that it is not set to any variable. However, at some point this node seems to get a child node which appears to be itself or at least is a duplicate of itself. Since there is no variable associated with that node it seems impossible to me that it can ever have a child node since there is no way to reference it as a parent. I can only guess that somehow there is a way for a node to implicitly obtain a child node. How is this possible and how can I figure out where that might be happening? TIA.