8.2.7.1.3.2. __bool__¶
- _Td.__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.
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.