Issue #19437: Fix fold_unaryops_on_constants() of the peephole optimizer, clear
the exception when PyList_Append() fails
diff --git a/Python/peephole.c b/Python/peephole.c
index a49790a..4185462 100644
--- a/Python/peephole.c
+++ b/Python/peephole.c
@@ -275,6 +275,7 @@
     len_consts = PyList_GET_SIZE(consts);
     if (PyList_Append(consts, newconst)) {
         Py_DECREF(newconst);
+        PyErr_Clear();
         return 0;
     }
     Py_DECREF(newconst);