On 25 August 2013 14:12, PJ Eby <p...@telecommunity.com> wrote: > That is to say, in the pure PEP 302 world, there is no special status > for "reload" that is different from "load" -- the *only* thing that's > different is that there is already a module object to use, and there > is *no guarantee that it's a module object that was initialized by the > loader now being invoked*.
Yeah, this is an aspect of why I'd like PEP 451 to use create & exec for the new loader API components. That way, any loader which either doesn't define the create method, or which returns NotImplemented from the call (a subtlety needed to make this work for C extensions), can be used with reload *and* with the -m switch via runpy (currently runpy demands the ability to get hold of the code object). > AFAICT both this proposal and the ModuleSpec one are making an invalid > assumption per PEP 302, and aren't explicitly proposing to change the > status quo: they just assume things that aren't actually assured by > the prior specs or implementations. Indeed. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com