On Sat, Aug 22, 2020 at 5:19 PM Chris Angelico <[email protected]> wrote:

> On Sun, Aug 23, 2020 at 10:14 AM Gustav O <[email protected]> wrote:
>
> >
>
> > I agree — having a warning would be fantastic! Personally, I think the
> minor speed drawback of




> A speed drawback on every import would almost certainly be too high a
>
> price to pay.


Yes, though if the extra check through the rest of the path were only done
when the module is found in the cwd, it may not cost much at all.

-CHB



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 -- [email protected]
>
> To unsubscribe send an email to [email protected]
>
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
>
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/S6IXKEMWSLL4MADILXS2KU5KRXZPZLQC/
>
> Code of Conduct: http://python.org/psf/codeofconduct/
>
> --
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/O5ZDC3Y5UC55LKDEUZH45PA3JPJOPLWU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to