Skip to content
Unverified Commit 3d1ca867 authored by Gregory P. Smith's avatar Gregory P. Smith Committed by GitHub
Browse files

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.
parent 5b4a7675
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment