Re: PEP 420: Implicit Namespace Packages
Brett Cannon <[email protected]>
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <CAP1=2W5NYRM1PjmWX=DPtYSAL_9S=q7ec-h3TWV8JEh5PfLY5Q@mail.gmail.com> |
On Fri, May 4, 2012 at 12:28 PM, [email protected] < [email protected]> wrote: > On Fri, May 4, 2012 at 9:21 AM, Brett Cannon <[email protected]> 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? _______________________________________________ Import-SIG mailing list [email protected] http://mail.python.org/mailman/listinfo/import-sig