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.

Title: Confusing text about __all__ in in tutorial
Type: enhancement Stage:
Components: Documentation Versions:
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.snow, ztane
Priority: normal Keywords:

Created on 2016-05-21 07:45 by ztane, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg265990 - (view) Author: Antti Haapala (ztane) * Date: 2016-05-21 07:45

says that 

"The import statement uses the following convention: if a package’s code defines a list named __all__, it is taken to be the list of module names that should be imported when from package import * is encountered."

However, of course this is not true. The behaviour is that `__all__` lists the names that are to be imported from the package with from package import *; only only those names that raise AttributeError at the time of import would be attempted to be imported as submodules.
Date User Action Args
2022-04-11 14:58:31adminsetgithub: 71261
2021-06-22 21:16:18iritkatrielsetnosy: + eric.snow
2016-05-21 07:45:05ztanecreate