]> granicus.if.org Git - python/commitdiff
Rephrase !PyErr_Occurred() comment: may=>can
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 18 Jan 2017 13:12:51 +0000 (14:12 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 18 Jan 2017 13:12:51 +0000 (14:12 +0100)
Issue #29259.

Objects/abstract.c
Objects/methodobject.c
Objects/object.c
Objects/typeobject.c
Python/ceval.c

index 1132b842ca192dd3c4575a9c7c5d28fd2285babb..7b1f19689117b04839980e0fec68abd07ce5b82f 100644 (file)
@@ -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());
 
index 5331cfb3199d9fdd7ce64fbed1d5aa1a00c6de23..ebea8b3d503736c524a5e198dea2e927453b6f8d 100644 (file)
@@ -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());
 
index dc50131e3fd146e69af36025d74d5a3566cee9ac..7b80bcb91da88c79c5be121b911da28e8ffd43d9 100644 (file)
@@ -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
index a52117721030ad9bd6b047ed2afe9be90a38aabd..0fdff318b8283b715cea40835bcf0e447000cb6c 100644 (file)
@@ -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
index 1b8cdfc663a0b086f63eaf9b5d638767aad0f1f0..87384709c91de9cdabdd75ae80fc422d0450b266 100644 (file)
@@ -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);