
Writing a Python module? Want to control which names are exported via “from .. import *”?
Define __all__, a list of strings indicating which names will be exported via “import *”:
x = 100
y = [10, 20, 30]
z = {100, 200, 300}
__all__ = ['x', 'z']

Writing a Python module? Want to control which names are exported via “from .. import *”?
Define __all__, a list of strings indicating which names will be exported via “import *”:
x = 100
y = [10, 20, 30]
z = {100, 200, 300}
__all__ = ['x', 'z']