Role in python __init__.py file

Action __init__.py file into a folder is a Python module, package Python each module, there are __init__.py file.

__Init__.py file is usually empty, but we also think it adds other features. When we import a package, in fact, it is importing its __init__.py file.

So that we can batch import module we need in __init__.py file, eliminating the need to import one by one.

Guess you like

Origin www.cnblogs.com/zjuhaohaoxuexi/p/12357554.html