Re: PEP 420: Implicit Namespace Packages
Brett Cannon <[email protected]>
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <CAP1=2W7BJ3ZnU_JUeMLJOqz2ffjzmyErU2U_uB_X2QsAk8FQDQ@mail.gmail.com> |
On Fri, May 4, 2012 at 12:00 PM, [email protected] < [email protected]> wrote: > On Fri, May 4, 2012 at 7:34 AM, Barry Warsaw <[email protected]> wrote: > > It's also not true even today. At our PEP 420 sprint we noticed > importlib > > does something like this to create new modules: > > > > >>> type(sys)('foo') > > > > That module isn't a built-in and doesn't have an __file__. It also > > doesn't have an __loader__, but oh well. > > > > (BTW, Brett, that's pretty clever. :) > 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. > It doesn't look > too hard to do, and I really want importlib to work when Jython starts > on Jython3 (I'm hoping to seriously start that this summer - Jython > 2.7 is progressing well). > I'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. _______________________________________________ Import-SIG mailing list [email protected] http://mail.python.org/mailman/listinfo/import-sig