<div class="gmail_quote">On Wed, Nov 23, 2011 at 11:37 PM, Nick Coghlan <span dir="ltr">&lt;<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.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">You have yet to identify any case where a script will break for a</div>
reason other than reliance on implicit relative imports inside a<br>
package</blockquote><div><br></div><div>You&#39;re right; I didn&#39;t think of this because I haven&#39;t moved past Python 2.5 for production coding as yet.  ;-)</div><div><br></div><div>I still think extraneous __init__.py files still exist in the field, but I&#39;ll admit that both of these things are infrequent cases.</div>
<div><br></div><div>However, if we&#39;re going on the basis of how many newbie errors can be solved by Just Working, PEP 402 will help more newbies than PEP 395, since you must first *have* a package in order for 395 to be meaningful.  ;-) </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> (which are *supposed* to be dead in 3.x, but linger in<br>
__main__ solely due to the way we initialise sys.path[0]). If a script<br>
is going to be legitimately shipped inside a package directory, it<br>
*must* be importable as part of that package namespace, and any script<br>
in Py3k that relies on implicit relative imports fails to qualify.<br></blockquote><div><br></div><div>Wait a minute...  What would happen if there were no implicit relative imports allowed in __main__?</div><div><br></div>
<div>Or are you just saying that you get the *appearance* of implicit relative importing, due to aliasing?</div><div><br></div></div>