8 Dec
2020
8 Dec
'20
5:01 p.m.
On Tue, Dec 8, 2020 at 11:05 PM Paul Sokolovsky
It'd be best to just write what you want directly, using the tools in importlib.
Of course, the implementation of the above for CPython would be based on importlib. And other implementations could implement that "directly", for the background idea of it being how to implement import hooks as frugally as possible, and easily allow to do most of what could be wanted of single-file import hooking.
Have you tried to just write this as-is? Python already offers a number of tools. Try writing it using the existing tools and see if this even needs to be a proposal. ChrisA