summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-05 21:38:47 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-05 21:38:47 (GMT)
commit7694100e4b44a6dd965964af323e5e0c23ffc897 (patch)
treec84e8a4d7e8480f23d0933dfbb6073a87696d8d5 /Objects
parent4251481ed9ff0abb20c7e709d1b13385d3a7ce68 (diff)
downloadcpython-7694100e4b44a6dd965964af323e5e0c23ffc897.zip
cpython-7694100e4b44a6dd965964af323e5e0c23ffc897.tar.gz
cpython-7694100e4b44a6dd965964af323e5e0c23ffc897.tar.bz2
Give with_traceback a docstring.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/exceptions.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index ba0c6bd..7b8dafa 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},
};