python package __init__ function and method __all__

__init__.py main role:

1. Python in the package identity can not be deleted

2. The definitions for fuzzy introduced __all__

3. Write Python code (not recommended python modules written in __init__, you can create additional modules in the package to write, try to ensure simple __init__.py)

 

__all__ role  

* Fuzzy introduced in the module defined by __all__, __ a further role is defined in __all__ init__.py the package, for introducing blur, such as __init__.py:

 

Guess you like

Origin www.cnblogs.com/bigbox/p/12162558.html