[Python-Dev] Re: Importing a submodule doesn't always set an attribute on its parent

2022年4月11日 14:56:50 -0700

Brett Cannon wrote:
> So we don't want to strengthen the definition at
> all; best we are comfortable with is put up a warning that you don't want
> to do stuff with sys.modules unless you know what you're doing.
OK, thanks for the clarification. Having read through the source of importlib 
one too many times, I guess I will declare that I "know what [I'm] doing" for 
now and keep on mutating sys.modules, since the alternative (intercepting all 
imports) seems more painful to me. If my code breaks in a future Python version 
I'll only blame myself :)
Best,
Daniel
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/HZEPOAI3YME4GD2M6RPWG2KG4OTSB5KX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to