<br><br><div class="gmail_quote">On Fri, May 4, 2012 at 12:28 PM, <a href="mailto:fwierzbicki@gmail.com">fwierzbicki@gmail.com</a> <span dir="ltr"><<a href="mailto:fwierzbicki@gmail.com" target="_blank">fwierzbicki@gmail.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="im">On Fri, May 4, 2012 at 9:21 AM, Brett Cannon <<a href="mailto:brett@python.org">brett@python.org</a>> wrote:<br>
>> Too clever for Jython at them moment :) -- which leads me to ask:<br>
>> Should I consider this a a feature of the sys module?<br>
><br>
><br>
> No, this is an ability of types.ModuleType (which I don't have access to in<br>
> importlib, so I just inlined the call). This works for any module in<br>
> CPython.<br>
</div>Ah of course, and our ModuleType works just fine for this. The Jython<br>
sys module is fake sadly. Perhaps 3.x will be the time to finally make<br>
it a real module... it's been a fake module with a comment at the top<br>
to make it a real module for longer than I've been involved.<br>
<br>
BTW any real module works for us, for example:<br>
<br>
>>> type(os)('foo')<br>
<module 'foo' (built-in)><br></blockquote><div><br></div><div>OK, so of the CPython built-in modules that importlib uses (sys, _imp, _warnings, _io, marshal, builtins, posix/nt), which are an actual module in Jython? </div>
</div>