diff options
author | Gregory P. Smith <greg@krypto.org> | 2021-10-09 19:34:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-09 19:34:13 (GMT) |
commit | 3d1ca867ed0e3ae343166806f8ddd9739e568ab4 (patch) | |
tree | dc2c9f5d02e164d7b07644c879e512f01efde916 /Python | |
parent | 5b4a7675bcfc6368aff955f4a6231579718f5dad (diff) | |
download | cpython-3d1ca867ed0e3ae343166806f8ddd9739e568ab4.zip cpython-3d1ca867ed0e3ae343166806f8ddd9739e568ab4.tar.gz cpython-3d1ca867ed0e3ae343166806f8ddd9739e568ab4.tar.bz2 |
bpo-45353: Remind sys.modules users to copy when iterating. (GH-28842)
This is true of all dictionaries in Python, but this one tends to
catch people off guard as they don't realize when sys.modules might
change out from underneath them as a hidden side effect of their
code. Copying it first avoids the RuntimeError. An example when
this happens in single threaded code are codecs being loaded which
are an implicit time of use import that most need not think about.
Diffstat (limited to 'Python')
0 files changed, 0 insertions, 0 deletions