Globals copy to prevent size change while iterating

This commit is contained in:
Maximilian Schmeller 2022-09-16 19:14:33 +02:00
parent 55138d7c87
commit c711cf488d

View file

@ -150,8 +150,7 @@
"os.makedirs(OUT_PATH, exist_ok=True)\n", "os.makedirs(OUT_PATH, exist_ok=True)\n",
"\n", "\n",
"print(\"User Settings:\")\n", "print(\"User Settings:\")\n",
"g = globals()\n", "for k, v in globals().copy().items():\n",
"for k, v in g.items():\n",
" if not k.isupper():\n", " if not k.isupper():\n",
" continue\n", " continue\n",
" print(f\" {k:.<40s} := {v}\")" " print(f\" {k:.<40s} := {v}\")"