Python package init file can have variable __all__
that lists the sub packages to be imported when using: from package import *
Is this same as writing import sub package name(s) in the init file (instead of __all__
) ?
I have read article thay says if the init.py file in the package directory contains a list named all, it is taken to be a list of modules that should be imported when the statement from import * is encountered.