diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-01-18 13:12:51 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-01-18 13:12:51 (GMT) |
commit | a8cb515a297989b731f2520f5518dde653de24ee (patch) | |
tree | e16d9df8ec4fbd052874a861900949c3b6f1e3ac | |
parent | 98ccba8344a349d1bbc27718215156478ffa19ed (diff) | |
download | cpython-a8cb515a297989b731f2520f5518dde653de24ee.zip cpython-a8cb515a297989b731f2520f5518dde653de24ee.tar.gz cpython-a8cb515a297989b731f2520f5518dde653de24ee.tar.bz2 |
Rephrase !PyErr_Occurred() comment: may=>can
Issue #29259.
-rw-r--r-- | Objects/abstract.c | 4 | ||||
-rw-r--r-- | Objects/methodobject.c | 2 | ||||
-rw-r--r-- | Objects/object.c | 4 | ||||
-rw-r--r-- | Objects/typeobject.c | 2 | ||||
-rw-r--r-- | Python/ceval.c | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 1132b84..7b1f196 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2233,7 +2233,7 @@ PyObject_Call(PyObject *callable, PyObject *args, PyObject *kwargs) 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_FastCallDict(PyObject *callable, PyObject **args, Py_ssize_t nargs, 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 --git a/Objects/methodobject.c b/Objects/methodobject.c index 5331cfb..ebea8b3 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -95,7 +95,7 @@ _PyMethodDef_RawFastCallDict(PyMethodDef *method, PyObject *self, PyObject **arg 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 --git a/Objects/object.c b/Objects/object.c index dc50131..7b80bcb 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -477,7 +477,7 @@ PyObject_Repr(PyObject *v) #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 @@ PyObject_Str(PyObject *v) #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 --git a/Objects/typeobject.c b/Objects/typeobject.c index a521177..0fdff31 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -887,7 +887,7 @@ type_call(PyTypeObject *type, PyObject *args, PyObject *kwds) #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 --git a/Python/ceval.c b/Python/ceval.c index 1b8cdfc..8738470 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1046,7 +1046,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) #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 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) 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); |