anytree
anytree copied to clipboard
Documentation example for Utilities confusing
I might misunderstand something, but the example for, e.g., leftsibling
in the documentation of anytree/util/__init__.py
states two things
- It suggest only
from anytree import Node
- To directly call, e.g.,
leftsibling(dan)
For me, both did not work out. I had to
- Import the method via
from anytree.util import leftsibling
- Do a, e.g.,
print(leftsibling(joe))
in order to get the desired output.