changeset: 95007:91fbe0fff882 user: Victor Stinner date: Mon Mar 16 11:52:32 2015 +0100 files: Python/ceval.c description: Issue #23571: Restore removed assert(!PyErr_Occurred()); in PyEval_CallObjectWithKeywords() Sorry Serhiy, I missed your explanation because the review email was moved to my Spam folder :-( diff -r 889023da7454 -r 91fbe0fff882 Python/ceval.c --- a/Python/ceval.c Mon Mar 16 08:31:38 2015 +0200 +++ b/Python/ceval.c Mon Mar 16 11:52:32 2015 +0100 @@ -4118,6 +4118,13 @@ { PyObject *result; +#ifdef Py_DEBUG + /* PyEval_CallObjectWithKeywords() must not be called with an exception + set. It raises a new exception if parameters are invalid or if + PyTuple_New() fails, and so the original exception is lost. */ + assert(!PyErr_Occurred()); +#endif + if (arg == NULL) { arg = PyTuple_New(0); if (arg == NULL)