<br><br><div class="gmail_quote">On Thu, May 3, 2012 at 12:11 PM, PJ Eby <span dir="ltr"><<a href="mailto:pje@telecommunity.com" target="_blank">pje@telecommunity.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On Thu, May 3, 2012 at 2:23 AM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br></div><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Standardising on a pattern also opens up the possibility of doing</div>
something meaningful with it in get_data() later. One of the<br>
guarantees of PEP 302 if that you should be able to do this:<br>
<br>
data_ref = os.path.join(__file__, relative_ref)<br>
data = __loader__.get_data(data_ref)<br></blockquote><div><br></div></div><div>Um, namespace package modules shouldn't have a __loader__ either, should they?</div></div></blockquote><div><br></div><div>No, they should (and PEP 302 now requires that). Namespace modules are loaded by a loader, and thus should have it defined. It's all the other optional interfaces that they don't need to have (e.g. NamespaceLoader should have importlib.abc.Loader and probably none of the other ABCs).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div><br></div></div>
<br>_______________________________________________<br>
Import-SIG mailing list<br>
<a href="mailto:Import-SIG@python.org">Import-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/import-sig" target="_blank">http://mail.python.org/mailman/listinfo/import-sig</a><br>
<br></blockquote></div><br>