Re: Rough PEP: A ModuleSpec Type for the Import System

Eric Snow <[email protected]>
Newsgroups gmane.comp.python.import
Message-ID <CALFfu7D6hO9wpeUYbOOn6bwDBG=rrkj+gPCkcf274E0rPUt5oA@mail.gmail.com>
On Fri, Aug 9, 2013 at 1:22 PM, Antoine Pitrou <[email protected]> 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

_______________________________________________
Import-SIG mailing list
[email protected]
http://mail.python.org/mailman/listinfo/import-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.