If the module ais executing from b import Foo, then it Foois a member aand is available as a.Foo. This means that now you can import it with from a import Foo.
This is usually used if you have a large library distributed between several files, and you want them to be accessible from one place. Say you have a package Foowith the following location:
foo/
a.py
b.py
c.py
__init__.py
a.py, b.py, c.py, Define the classes a, Band Crespectively.
If you want to use these classes, you usually need to write
from foo.a import A
from foo.b import B
from foo.c import C
:
, __init__.py:
from a import A
from b import B
from c import C
, :
from foo import A,B,C