In your answer, it sounds like the code would be written by the person developing a program. Or they could possibly have the importhook a separate module, which can be imported whenever you’d like to have it.
Maybe I misunderstood you, but this wouldn’t really be optimal. I think most people would like to get the part about shadowing imports without having to write any code or import a module that sends such error messages if a module might be shadowed. That removes the convenience of having something like that be a standard feature of the language itself. Would it be possible to make the exceptionhook a standard part of python, so it’s there by default? _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/VA24OZVHWT5BPMDFO57BSYD23N3UJALK/ Code of Conduct: http://python.org/psf/codeofconduct/