<br><br><div class="gmail_quote">On Sun, Jul 10, 2011 at 20:10, P.J. Eby <span dir="ltr">&lt;<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">At 10:34 PM 7/10/2011 -0400, P.J. Eby wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The big advantage of this approach is that it doesn&#39;t require us to have a special name - it&#39;s just, &quot;Enhanced Package Imports&quot; or some such.  No special marker files to name, either.  Just, &quot;hey, people want to put their package contents in more than one directory, and they don&#39;t always need an __init__.py.&quot;<br>


<br>
Thoughts, anyone?<br>
</blockquote>
<br></div>
A quick follow-up; I found a thread where something vaguely similar was discussed before:<br>
<br>
  <a href="http://mail.python.org/pipermail/python-dev/2006-April/064400.html" target="_blank">http://mail.python.org/<u></u>pipermail/python-dev/2006-<u></u>April/064400.html</a><br>
<br>
Various issues regarding tool support were brought up, mainly that existing tools would not detect such packages as packages, and that doing this at the top level was problematic because of the possibility of blocking a module like &#39;string&#39; or &#39;time&#39; or some such.<br>


<br>
However, as it happens, with a slight adjustment to what I proposed, that latter issue can be addressed...  if *any* loadable module anywhere on sys.path (vs. just a directory with an __init__) simply gets all the subpaths appended to its __path__, then having a &quot;time&quot; directory just gets it added to time.__path__ -- and the plain old __time__ module still gets loaded.<br>

</blockquote><div><br></div><div>I didn&#39;t read the thread, but I don&#39;t get the worry here. A &#39;time&#39; package already will shadow a &#39;time&#39; module if it is farther up sys.path, so this proposal in any of its current forms won&#39;t change that.</div>

</div>