[Python-ideas] PEP: Distributing a Subset of the Standard Library
Ethan Furman
ethan at stoneleaf.us
Mon Nov 28 17:47:57 EST 2016
On 11/28/2016 02:42 PM, Wolfgang Maier wrote:
> A refined (from my previous post which may have ended up too nested)
> alternative: instead of triggering an immediate search for a .missing.py
> file, why not have the interpreter intercept any ModuleNotFoundError
> that bubbles up to the top without being caught, then uses the name
> attribute of the exception to look for the .missing.py file. Agreed,
> this is more complicated to implement, but it would avoid any perfor-
>mance loss in situations where running code knows how to deal with the
> missing module anyway.
So we only have the hit when the exception is going to kill the interpreter?
+1
--
~Ethan~
More information about the Python-ideas
mailing list