2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 18:52:26 +00:00

Hans Meine's extra new-line for epydoc with reST compatibility

[SVN r37906]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2007-06-06 00:00:57 +00:00
parent e9caacc428
commit 9de994c0d1
5 changed files with 32 additions and 31 deletions

View File

@@ -507,7 +507,8 @@ void function::add_to_namespace(
{
if ( PyObject_HasAttrString(mutable_attribute.ptr(), "__doc__")
&& mutable_attribute.attr("__doc__")) {
mutable_attribute.attr("__doc__") += "\n";
mutable_attribute.attr("__doc__") += (
mutable_attribute.attr("__doc__")[-1] != "\n" ? "\n\n" : "\n");
}
else {
mutable_attribute.attr("__doc__") = "";