Re: Round 2 for "A ModuleSpec Type for the Import System"
Brett Cannon <[email protected]>
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <CAP1=2W7CJmbrmGhgAGXvM-mqnHM0DHJXUZaZdBVrW5G9YwGXOA@mail.gmail.com> |
On Wed, Aug 28, 2013 at 10:43 AM, Eric Snow <[email protected]>wrote: > On Aug 28, 2013 3:26 AM, "Nick Coghlan" <[email protected]> wrote: > > I realised that if we're going to allow mutating the spec in create, > we're going to have to promise not to reuse them across load calls. So > loaders can be shared, but specs can't. > > The latest version of the PEP already specifies that each module will have > its own copy, even if the spec is otherwise the same. Perhaps it should > also make clear that loading_info should not be shared between specs. > That's really none of our business. If loading_info is going to be up to the finder to populate and the loader to consume as an opaque thing then we should not dictate its usage, just say that only the corresponding loader for the finder should use that object and that people should not expect its interface to be stable. > It wouldn't hurt to also say something about allowing only one call to > load() or something along those lines. > Why? You can create objects constantly. You should say you expect people to use reload() to reload things, but otherwise what if I truly want to reset the module and start from scratch with a second call to load()? -Brett > -eric > > _______________________________________________ > Import-SIG mailing list > [email protected] > http://mail.python.org/mailman/listinfo/import-sig > > _______________________________________________ Import-SIG mailing list [email protected] http://mail.python.org/mailman/listinfo/import-sig