8.2.7.1.2.2. __bool__¶
- _Table.__bool__()
Node instances are always true, even if they’re empty. A node is more than a simple container. Its boolean “truth” does not depend on having one or more subnodes in the doctree.
Use len() to check node length.