[New-bugs-announce] [issue43138] [doc] Inconsistent / confusing documentation regarding importing submodules
Dirk Herrmann
report at bugs.python.org
Fri Feb 5 12:33:30 EST 2021
New submission from Dirk Herrmann <dirk.herrmann-privat at gmx.de>:
In the language reference, section "7.11 The import statement" is is explained in the example section:
import foo.bar.baz # foo.bar.baz imported, foo bound locally
When looking at "5.3. Searching", it is stated that regarding foo.bar.baz:
In this case, Python first tries to import foo, then foo.bar, and finally foo.bar.baz.
I find this confusing. Assuming that 5.3 is correct, the examples in 7.11 could be improved, like, for the sample line mentioned above:
import foo.bar.baz # foo, foo.bar and foo.bar.baz imported, foo bound locally
----------
assignee: docs at python
components: Documentation
messages: 386532
nosy: Dirk Herrmann, docs at python
priority: normal
severity: normal
status: open
title: [doc] Inconsistent / confusing documentation regarding importing submodules
type: enhancement
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43138>
_______________________________________
More information about the New-bugs-announce
mailing list