Terry J. Reedy added the comment:
https://docs.python.org/3/reference/import.html#submodules
The point of the section is that even though the names 'for' and 'bar' are not
directly importing into 'spam', they get attached to 'spam' any way as indirect
effect of 'from'. 'Foo' and 'Bar are
New submission from Jens Rapp :
Documentation 5.4.2. Submodules tells what happens to modules which are
imported inside __init__.py of a package>
from .foo import Foo
from .bar import Bar
then executing the following puts a name binding to foo and bar in the spam
module:
>>>
>>> import