__all__: Import only Specific Python Objects when Using import *

__all__: Import only Specific Python Objects when Using import *

If you want to import only specific Python objects when using import *, insert __all__ in the script that Python objects are imported from.

The code above is an example of using __all__.

Scroll to Top

Work with Khuyen Tran

Work with Khuyen Tran