[New-bugs-announce] [issue35927] Intra-package References Documentation Incomplete

ADataGman report at bugs.python.org
Wed Feb 6 23:38:30 EST 2019


New submission from ADataGman <aarongrossman at gmail.com>:

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

----------
assignee: docs at python
components: Documentation
files: sound.zip
messages: 335002
nosy: ADataGman, docs at python
priority: normal
severity: normal
status: open
title: Intra-package References Documentation Incomplete
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file48109/sound.zip

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35927>
_______________________________________


More information about the New-bugs-announce mailing list