this is done to prevent directories with a common name, such as string, from unintentionally hiding valid modules that occur later on the module search path.
大致的理解是:
可能會有一些文件夾,比如有個專門放字符串的文件夾叫string,如果所有目錄都視爲包的話,import string可能就會覆蓋python的string,而產生錯誤.而只有帶init.py的才視爲包的話,專門放字符串的文件夾string裏肯定不會放一個init.py,就不會覆蓋python的string.