diff options
author | Georg Brandl <georg@python.org> | 2008-03-25 08:29:14 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-03-25 08:29:14 +0000 |
commit | d5b635f1969fdd609f0aff5669c9ec30e61be62e (patch) | |
tree | 1c854f8108e2b22d8c5ba4d529b6d99cd9f5f244 /Objects/exceptions.c | |
parent | 80055f6295dd48274ae68d13806c7ee3c5b5882f (diff) | |
download | cpython-git-d5b635f1969fdd609f0aff5669c9ec30e61be62e.tar.gz |
Make Py3k warnings consistent w.r.t. punctuation; also respect the
EOL 80 limit and supply more alternatives in warning messages.
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r-- | Objects/exceptions.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 7fecb35cbf..ec17bc23a4 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -190,10 +190,10 @@ static PyObject * BaseException_getitem(PyBaseExceptionObject *self, Py_ssize_t index) { if (Py_Py3kWarningFlag) { - if (PyErr_Warn(PyExc_DeprecationWarning, - "In 3.x, __getitem__ is not supported for exception " - "classes, use args attribute") == -1) - return NULL; + if (PyErr_Warn(PyExc_DeprecationWarning, + "__getitem__ not supported for exception " + "classes in 3.x; use args attribute") == -1) + return NULL; } return PySequence_GetItem(self->args, index); } @@ -203,10 +203,10 @@ BaseException_getslice(PyBaseExceptionObject *self, Py_ssize_t start, Py_ssize_t stop) { if (Py_Py3kWarningFlag) { - if (PyErr_Warn(PyExc_DeprecationWarning, - "In 3.x, __getslice__ is not supported for exception " - "classes, use args attribute") == -1) - return NULL; + if (PyErr_Warn(PyExc_DeprecationWarning, + "__getslice__ not supported for exception " + "classes in 3.x; use args attribute") == -1) + return NULL; } return PySequence_GetSlice(self->args, start, stop); } |