New submission from ADataGman <aarongross...@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@python
components: Documentation
files: sound.zip
messages: 335002
nosy: ADataGman, docs@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue35927>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to