From: Robert Bradshaw Date: Sat, 16 Aug 2008 11:06:41 +0000 (-0700) Subject: Optimization for shorter docstrings. X-Git-Tag: 0.9.8.1~16 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d75b726f474763731e9fcd0696a9da33af43864b;p=cython.git Optimization for shorter docstrings. --- diff --git a/Cython/Compiler/StringEncoding.py b/Cython/Compiler/StringEncoding.py index 93b4a9a2..12ae3588 100644 --- a/Cython/Compiler/StringEncoding.py +++ b/Cython/Compiler/StringEncoding.py @@ -144,4 +144,6 @@ def escape_byte_string(s): return ''.join(l) def split_docstring(s): + if len(s) < 2047: + return s return '\\n\"\"'.join(s.split(r'\n'))