2022-04-09 04:24 UTC, Terry Reedy <tjre...@udel.edu>γ―ζ›Έγ„γŸ:
> Perhaps something intentionally vague like
>
> "Manual deletion of entries from sys.modules may invalidate statements
> above, even after re-imports."
>
> or
>
> "Manual deletion of entries from sys.modules may result in surprising
> behavior, even after re-imports."

Not only deletion, but also random assignments:

>>> import sys
>>> import collections.abc
>>> sys.modules['collections'] = 1
>>> import collections.abc
>>> collections.abc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'int' object has no attribute 'abc'
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/IRXLI6XANNQTOGSBQGOFX25UJD6J4SGJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to