2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 17:12:22 +00:00

Concatentation subsequent function docstrings rather than replace the original.

[SVN r27332]
This commit is contained in:
Jonathan Brandmeyer
2005-02-11 20:03:13 +00:00
parent 1cfa79554d
commit 4d50bf0ad9
4 changed files with 18 additions and 5 deletions

View File

@@ -472,7 +472,12 @@ void function::add_to_namespace(
if (doc != 0)
{
object attr_copy(attribute);
attr_copy.attr("__doc__") = doc;
if (PyObject_HasAttrString(attr_copy.ptr(), "__doc__") && attr_copy.attr("__doc__")) {
attr_copy.attr("__doc__") += "\n\n";
attr_copy.attr("__doc__") += doc;
}
else
attr_copy.attr("__doc__") = doc;
}
}