On Sat, Aug 22, 2020, at 20:17, Chris Angelico wrote:
> A speed drawback on every import would almost certainly be too high a
> price to pay.

My proposal would only add an extra check 1) on module load [not on import, so 
you only pay it once per module, and not at all for built-in modules] 2) only 
for modules loaded from the first entry in sys.path [script directory / current 
directory], so it shouldn't add much overhead at all to imports of stdlib or 
installed packages.
_______________________________________________
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/APNOGQUDRMNJWIKMSR3VZD7BJYL5YISD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to