Message405769
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 spam
>>> spam.foo
<module 'spam.foo' from '/tmp/imports/spam/foo.py'>
>>> spam.bar
<module 'spam.bar' from '/tmp/imports/spam/bar.py'>
I miss information on what happes to Foo and Bar.
is it directly usable under spam.Bar() or does one have to use spam.bar.Bar()?
To my mind, that example should tell this. |
|
Date |
User |
Action |
Args |
2021-11-05 07:32:21 | rapp.jens | set | recipients:
+ rapp.jens, docs@python |
2021-11-05 07:32:21 | rapp.jens | set | messageid: <1636097541.32.0.940629899159.issue45722@roundup.psfhosted.org> |
2021-11-05 07:32:21 | rapp.jens | link | issue45722 messages |
2021-11-05 07:32:21 | rapp.jens | create | |
|