Optimization for shorter docstrings.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 16 Aug 2008 11:06:41 +0000 (04:06 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 16 Aug 2008 11:06:41 +0000 (04:06 -0700)
Cython/Compiler/StringEncoding.py

index 93b4a9a23c6384816c11f7180b053a98ec6fcc40..12ae3588788cae62c9122ff2545af4757b40f10b 100644 (file)
@@ -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'))