<p>在阅读<a href="http://docs.python.org/2/tutorial/modules.html" rel="nofollow">python manual</a>的6.4包部分时,我遇到了以下一行:</p>
<blockquote>
<p>The <code>__init__.py</code> files are required to make Python treat the directories
as containing packages; 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.</p>
</blockquote>
<p>我知道需要<code>__init__.py</code>将目录标记为包含包,但我不明白<code>prevent directories with a common name...from unintentionally hiding valid modules...</code>是什么意思。在</p>
<p>有人能解释一下为什么需要<code>__init__.py</code>?在</p>