When I import a subpackage in a package, can I rely on the fact that the parent package is also imported ?
e.g. this works
python -c \"import os.path; pr
Yes, you can rely on it always working. Python has to include os in the namespace for os.path to work.
os
os.path
What won't work is using the from os import path notation. In that case, the os module is not brought into the namespace, only path.
from os import path
path