[Import-SIG] Rough PEP: A ModuleSpec Type for the Import System

Eric Snow ericsnowcurrently at gmail.com
Sat Aug 10 00:44:55 CEST 2013


On Fri, Aug 9, 2013 at 1:22 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:

> Well, is there another way to use load() than:
> - load(): load a new module
> - load(existing_module, is_reload=True): reload an existing module
>
> I mean, does it make sense to call e.g.
> - load(some_existing_module, is_reload=False)
>

This would be a ValueError.  The module argument is meant just for reload.
 I'm not sure it makes sense otherwise.  Perhaps so you could prepare your
own new module prior to calling load()?  I'd like to leave that off the
table for this PEP.


> - load(is_reload=True)
>

This was always okay in my mind, but I realized it did not make it to the
PEP until Brett had some similar questions. :)  The updated PEP covers
this.  Like I told Brett, I'm going to see how a separate reload() looks
and go from there.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/import-sig/attachments/20130809/bfbb45c5/attachment.html>


More information about the Import-SIG mailing list