In the case ofsys.modules, the problem is that assigning a bogus value (e.g. []) can
cause the interpreter to crash. It wasn't a problem until recently
when I removed PyInterpreterState.modules and made sys.modules
authoritative (see https://bugs.python.org/issue28411 ).