This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rapp.jens
Recipients docs@python, rapp.jens
Date 2021-11-05.07:32:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636097541.32.0.940629899159.issue45722@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-11-05 07:32:21rapp.jenssetrecipients: + rapp.jens, docs@python
2021-11-05 07:32:21rapp.jenssetmessageid: <1636097541.32.0.940629899159.issue45722@roundup.psfhosted.org>
2021-11-05 07:32:21rapp.jenslinkissue45722 messages
2021-11-05 07:32:21rapp.jenscreate