changeset: 106219:11039ece46b9 user: Victor Stinner date: Wed Jan 18 14:12:51 2017 +0100 files: Objects/abstract.c Objects/methodobject.c Objects/object.c Objects/typeobject.c Python/ceval.c description: Rephrase !PyErr_Occurred() comment: may=>can Issue #29259. diff -r ee6e1b1151a8 -r 11039ece46b9 Objects/abstract.c --- a/Objects/abstract.c Wed Jan 18 14:06:38 2017 +0100 +++ b/Objects/abstract.c Wed Jan 18 14:12:51 2017 +0100 @@ -2233,7 +2233,7 @@ PyObject *result; /* PyObject_Call() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the + because it can clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); assert(PyTuple_Check(args)); @@ -2309,7 +2309,7 @@ PyObject *result = NULL; /* _PyObject_FastCallDict() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the + because it can clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); diff -r ee6e1b1151a8 -r 11039ece46b9 Objects/methodobject.c --- a/Objects/methodobject.c Wed Jan 18 14:06:38 2017 +0100 +++ b/Objects/methodobject.c Wed Jan 18 14:12:51 2017 +0100 @@ -95,7 +95,7 @@ int flags; /* _PyMethodDef_RawFastCallDict() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the + because it can clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); diff -r ee6e1b1151a8 -r 11039ece46b9 Objects/object.c --- a/Objects/object.c Wed Jan 18 14:06:38 2017 +0100 +++ b/Objects/object.c Wed Jan 18 14:12:51 2017 +0100 @@ -477,7 +477,7 @@ #ifdef Py_DEBUG /* PyObject_Repr() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the + because it can clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); #endif @@ -526,7 +526,7 @@ #ifdef Py_DEBUG /* PyObject_Str() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the + because it can clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); #endif diff -r ee6e1b1151a8 -r 11039ece46b9 Objects/typeobject.c --- a/Objects/typeobject.c Wed Jan 18 14:06:38 2017 +0100 +++ b/Objects/typeobject.c Wed Jan 18 14:12:51 2017 +0100 @@ -887,7 +887,7 @@ #ifdef Py_DEBUG /* type_call() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the + because it can clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); #endif diff -r ee6e1b1151a8 -r 11039ece46b9 Python/ceval.c --- a/Python/ceval.c Wed Jan 18 14:06:38 2017 +0100 +++ b/Python/ceval.c Wed Jan 18 14:12:51 2017 +0100 @@ -1046,7 +1046,7 @@ #ifdef Py_DEBUG /* PyEval_EvalFrameEx() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the + because it can clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); #endif @@ -3244,7 +3244,7 @@ if (meth_found) { /* We can bypass temporary bound method object. meth is unbound method and obj is self. - + meth | self | arg1 | ... | argN */ SET_TOP(meth);