[Import-SIG] PEP 420: Implicit Namespace Packages

Brett Cannon brett at python.org
Fri May 4 19:32:53 CEST 2012


On Fri, May 4, 2012 at 12:28 PM, fwierzbicki at gmail.com <
fwierzbicki at gmail.com> wrote:

> On Fri, May 4, 2012 at 9:21 AM, Brett Cannon <brett at python.org> wrote:
> >> Too clever for Jython at them moment :) -- which leads me to ask:
> >> Should I consider this a a feature of the sys module?
> >
> >
> > No, this is an ability of types.ModuleType (which I don't have access to
> in
> > importlib, so I just inlined the call). This works for any module in
> > CPython.
> Ah of course, and our ModuleType works just fine for this. The Jython
> sys module is fake sadly. Perhaps 3.x will be the time to finally make
> it a real module... it's been a fake module  with a comment at the top
> to make it a real module for longer than I've been involved.
>
> BTW any real module works for us, for example:
>
> >>> type(os)('foo')
> <module 'foo' (built-in)>
>

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/import-sig/attachments/20120504/9488672e/attachment-0001.html>


More information about the Import-SIG mailing list