<br><br><div class="gmail_quote">On Fri, May 4, 2012 at 12:00 PM, <a href="mailto:fwierzbicki@gmail.com">fwierzbicki@gmail.com</a> <span dir="ltr">&lt;<a href="mailto:fwierzbicki@gmail.com" target="_blank">fwierzbicki@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">On Fri, May 4, 2012 at 7:34 AM, Barry Warsaw &lt;<a href="mailto:barry@python.org">barry@python.org</a>&gt; wrote:<br>


&gt; It&#39;s also not true even today.  At our PEP 420 sprint we noticed importlib<br>
&gt; does something like this to create new modules:<br>
&gt;<br>
&gt;    &gt;&gt;&gt; type(sys)(&#39;foo&#39;)<br>
&gt;<br>
&gt; That module isn&#39;t a built-in and doesn&#39;t have an __file__.  It also<br>
&gt; doesn&#39;t have an __loader__, but oh well.<br>
&gt;<br>
&gt; (BTW, Brett, that&#39;s pretty clever. :)<br>
</div>Too clever for Jython at them moment :) -- which leads me to ask:<br>
Should I consider this a a feature of the sys module?</blockquote><div><br></div><div>No, this is an ability of types.ModuleType (which I don&#39;t have access to in importlib, so I just inlined the call). This works for any module in CPython.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> It doesn&#39;t look<br>
too hard to do, and I really want importlib to work when Jython starts<br>
on Jython3 (I&#39;m hoping to seriously start that this summer - Jython<br>
2.7 is progressing well).<br></blockquote><div><br></div><div> I&#39;ve actually been meaning to email the various VMs to have them look over importlib to see if there are any sticking points that are obvious so we can fix them now instead of waiting until a point release when the first VM other than CPython tries to use importlib.</div>

</div>