On Sun, Aug 23, 2020 at 10:14 AM Gustav O <gus...@odinger.se> wrote: > > I agree — having a warning would be fantastic! Personally, I think the minor > speed drawback of checking the full path would be worth it, in most cases. > The fact that a module is being shadowed is really valuable information to > have. >
A speed drawback on every import would almost certainly be too high a price to pay. Maybe this would make a useful excepthook? If an AttributeError is about to be printed to the console, and the failing object is a module, *then* look through the path and see if it was shadowed. 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/S6IXKEMWSLL4MADILXS2KU5KRXZPZLQC/ Code of Conduct: http://python.org/psf/codeofconduct/