Author ADataGman
Recipients ADataGman, docs@python
Date 2019-02-07.04:38:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1549514310.42.0.442993756904.issue35927@roundup.psfhosted.org>
In-reply-to
Content
Attempting to follow https://docs.python.org/3.6/tutorial/modules.html#intra-package-references I was unable to recreate the intra-package reference as described. 

"For example, if the module sound.filters.vocoder needs to use the echo module in the sound.effects package, it can use from sound.effects import echo."

Creating the file structure described in https://docs.python.org/3.6/tutorial/modules.html#packages, with empty __init__.py files at all levels, or with __all__ defined as containing relevant file names, results in "No module named 'sound'". If I try to run this using "from ..effects import echo" then it results in "attempted relative import beyond top-level package".

At least one other user has run into this issue with this stack overflow post: https://stackoverflow.com/questions/53109627/python-intra-package-reference-doesnt-work-at-all
History
Date User Action Args
2019-02-07 04:38:34ADataGmansetrecipients: + ADataGman, docs@python
2019-02-07 04:38:30ADataGmansetmessageid: <1549514310.42.0.442993756904.issue35927@roundup.psfhosted.org>
2019-02-07 04:38:30ADataGmanlinkissue35927 messages
2019-02-07 04:38:30ADataGmancreate