From: Georg Brandl Date: Mon, 5 May 2008 21:38:47 +0000 (+0000) Subject: Give with_traceback a docstring. X-Git-Tag: v3.0a5~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7694100e4b44a6dd965964af323e5e0c23ffc897;p=python Give with_traceback a docstring. --- diff --git a/Objects/exceptions.c b/Objects/exceptions.c index ba0c6bd851..7b8dafab9b 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -151,11 +151,16 @@ BaseException_with_traceback(PyObject *self, PyObject *tb) { return self; } +PyDoc_STRVAR(with_traceback_doc, +"Exception.with_traceback(tb) --\n\ + set self.__traceback__ to tb and return self."); + static PyMethodDef BaseException_methods[] = { {"__reduce__", (PyCFunction)BaseException_reduce, METH_NOARGS }, {"__setstate__", (PyCFunction)BaseException_setstate, METH_O }, - {"with_traceback", (PyCFunction)BaseException_with_traceback, METH_O }, + {"with_traceback", (PyCFunction)BaseException_with_traceback, METH_O, + with_traceback_doc}, {NULL, NULL, 0, NULL}, };