diff -r 1ab1a04785bc -r 4e90138f3046 Tools/clinic/clinic.py --- a/Tools/clinic/clinic.py Mon Feb 10 10:30:46 2014 -0600 +++ b/Tools/clinic/clinic.py Mon Feb 10 12:01:11 2014 -0600 @@ -66,6 +66,8 @@ unknown = Unknown() +sig_end_marker = '--' + def _text_accumulator(): text = [] @@ -555,8 +557,13 @@ add(quoted_for_c_string(line)) add('\\n"\n') - text.pop() - add('"') + if text[-2] == sig_end_marker: + # If we only have a signature, add the blank line that the + # __text_signature__ getter expects to be there. + add('"\\n"') + else: + text.pop() + add('"') return ''.join(text) def output_templates(self, f): @@ -3969,7 +3976,7 @@ # add(f.return_converter.py_default) if not f.docstring_only: - add("\n--\n") + add("\n" + sig_end_marker + "\n") docstring_first_line = output()