<br><br><div class="gmail_quote">On Tue, Aug 7, 2012 at 4:52 PM, Stefan Behnel <span dir="ltr"><<a href="mailto:stefan_ml@behnel.de" target="_blank">stefan_ml@behnel.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
could someone please add a sentence to PEP 366 that describes the actual<br>
content of the new "__package__" attribute (and thus, the PEP)?<br>
<br>
<a href="http://www.python.org/dev/peps/pep-0366/" target="_blank">http://www.python.org/dev/peps/pep-0366/</a><br>
<br>
I had to read through almost the entire document to be assured that<br>
"__package__" is really supposed to contain a string and I had a hard time<br>
nailing down its content. The only real hint in there is the example, and<br>
even that is ambiguous.<br></blockquote><div><br></div><div>Two things when it comes to understanding import now. One is that Barry's heavy rewrite of the import docs makes all of this much clearer and thus should be used as the reference over the PEPs, e.g. <a href="http://docs.python.org/dev/py3k/reference/import.html?highlight=__package__#loaders">http://docs.python.org/dev/py3k/reference/import.html?highlight=__package__#loaders</a> explains how __package__ should be set very clearly (yes, it references PEP 366 for nitty-gritty discussion and details, but honestly there isn't anything in the PEP that he didn't explain in the reference).</div>
<div><br></div><div>Two is that importlib makes it fairly straight-forward to read the source code to understand how some aspect of imports work and should be clear enough to not require reading PEPs to understand how a feature works.</div>
<div><br></div><div>Honestly, updating the PEPs constantly is a pain. We have code and docs already that most users follow, so worrying about constantly touching up PEPs is simply a third thing to have to keep track of that a majority of our users will never see. I know I don't plan to touch PEP 302 anymore in order to keep things straight in that doc as it's more hassle than it's worth.</div>
</div>