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

Antoine Pitrou solipsis at pitrou.net
Fri Aug 9 21:22:49 CEST 2013


On Fri, 9 Aug 2013 10:45:22 -0600
Eric Snow <ericsnowcurrently at gmail.com> wrote:
> > So how about separate load() and reload() methods?
> >
> 
> I thought about that too, but found it simpler to keep them together.
>  Also, reload is a pretty specialized activity and I plan on leaving some
> of the boilerplate of it to importlib.reload().  However, I'm not convinced
> either way actually.  I'll think about that some more and update the PEP
> regardless.  Do you have a case to make for making them separate?

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)
- load(is_reload=True)

?

Regards

Antoine.


More information about the Import-SIG mailing list