This code:
from lxml.html import fromstring, tostring
s = '<span class="left">Whatever</span>'
e = fromstring(s)
print(tostring(e))
print(bool(e))
outputs:
<span class="left">Whatever</span>
False
Why? How boolean check working in this class? Point me on relevant documentation or code please.
ps
Im using lxml
3.3.5
not not ""
is False whilenot not "something"
is True