]> granicus.if.org Git - python/commitdiff
Give with_traceback a docstring.
authorGeorg Brandl <georg@python.org>
Mon, 5 May 2008 21:38:47 +0000 (21:38 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 5 May 2008 21:38:47 +0000 (21:38 +0000)
Objects/exceptions.c

index ba0c6bd851f879b0bf98815f5b48b740b5b713f1..7b8dafab9b9e0e978c7f62b04290052f5a982820 100644 (file)
@@ -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},
 };