Re: PEP 451: Big update.

Nick Coghlan <[email protected]> Thu, 19 Sep 2013 02:08:57 +1000
Newsgroups gmane.comp.python.import
Message-ID <CADiSq7f3BQ03zVLxqNed84=y5w9TG494_SP2eQqb03y5CETNag@mail.gmail.com>
On 18 September 2013 19:51, Eric Snow <[email protected]> wrote:
> Hi all,
>
> I finally got some time to update the PEP.  I've simplified a few things,
> most notably by making the 4 ModuleSpec methods (create, exec, load, reload)
> "private".
>
> Also notable is that the new loader method is still create_module() and
> there is still no flag for is_reload on either of the loader methods.  I'm
> still not clear on what the flag buys us and on why anything we'd do in a
> prepare_module() we couldn't do in exec_module().  I'm trying to keep this
> simple. :)

The point is to give the invoker of the loader a chance to muck about
with the module state before actually executing the module. For
example, runpy and the updated extension loader API could use this to
support execution of compiled Cython modules with -m.

Cheers,
Nick.

-- 
Nick Coghlan   |   [email protected]   |   Brisbane, Australia