The following two statements appear to be equivalent (assuming b
is a submodule):
import a.b as c
and
from a import b as c
Both allow me to refer to a.b.foo
as c.foo
.
Which one is preferred?
The following two statements appear to be equivalent (assuming b
is a submodule):
import a.b as c
and
from a import b as c
Both allow me to refer to a.b.foo
as c.foo
.
Which one is preferred?