On Sun, Aug 23, 2020 at 11:19 AM Gustav O <gus...@odinger.se> wrote: > > 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. >
Initially, it would be something you could add to sitecustomize.py, making it immediately available. > Would it be possible to make the exceptionhook a standard part of python, so > it’s there by default? > Yes, it would. That would be a fully-debated proposal, but it is certainly possible for this sort of thing to be added to the core language. But if it's done as an excepthook, then even before that, it can be added by any sysadmin or any individual programmer. ChrisA _______________________________________________ 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/74URDLFGO4VG7FCZSUWP3QLB5EYIRYBU/ Code of Conduct: http://python.org/psf/codeofconduct/