Index: Python/pystate.c =================================================================== --- Python/pystate.c (revision 64979) +++ Python/pystate.c (working copy) @@ -233,7 +233,7 @@ if (!def) return -1; if (!state->modules_by_index) { - state->modules_by_index = PyList_New(20); + state->modules_by_index = PyList_New(0); if (!state->modules_by_index) return -1; }