From d75b726f474763731e9fcd0696a9da33af43864b Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 16 Aug 2008 04:06:41 -0700 Subject: [PATCH] Optimization for shorter docstrings. --- Cython/Compiler/StringEncoding.py | 2 ++ 1 file changed, 2 insertions(+) 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')) -- 2.26.2