I'm attempting to use lxml.etree. However, the import doesn't behave as I'd expect as can be seen below. What am I missing? I've never seen other modules behave like this.
$ python
Python 3.7.4 (default, Nov 18 2019, 17:30:21)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>> lxml.etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'lxml' has no attribute 'etree'
>>> from lxml import etree
>>> etree
<module 'lxml.etree' from '/home/me/env/project/lib/python3.7/site-packages/lxml/etree.cpython-37m-x86_64-linux-gnu.so'>
>>> lxml.etree
<module 'lxml.etree' from '/home/me/env/project/lib/python3.7/site-packages/lxml/etree.cpython-37m-x86_64-linux-gnu.so'>
>>>