[pypy-svn] r8700 - pypy/dist/pypy/tool

tismer at codespeak.net tismer at codespeak.net
Sat Jan 29 13:16:08 CET 2005


Author: tismer
Date: Sat Jan 29 13:16:08 2005
New Revision: 8700

Modified:
   pypy/dist/pypy/tool/sourcetools.py   (contents, props changed)
Log:
fixeol for sourcetools.py

Modified: pypy/dist/pypy/tool/sourcetools.py
==============================================================================
--- pypy/dist/pypy/tool/sourcetools.py	(original)
+++ pypy/dist/pypy/tool/sourcetools.py	Sat Jan 29 13:16:08 2005
@@ -1,21 +1,21 @@
-# a couple of support functions which
-# help with generating Python source.
-
-def render_docstr(func, indent_str='', closing_str='', q='"""', redo=True):
-    """ Render a docstring as a sequence of lines.
-        The argument is either a docstring or an object"""
-    if type(func) is not str:
-        doc = func.__doc__
-    else:
-        doc = func
-    if doc is None:
-        return []
-    doc = indent_str + q + doc.replace(q, "\\"+q) + q + closing_str
-    doc2 = doc
-    if q in doc and redo:
-        doc2 = render_docstr(func, indent_str, closing_str, "'''", False)
-    if not redo:
-        return doc # recursion case
-    doc = (doc, doc2)[len(doc2) < len(doc)]
-    return [line for line in doc.split('\n')]
-
+# a couple of support functions which
+# help with generating Python source.
+
+def render_docstr(func, indent_str='', closing_str='', q='"""', redo=True):
+    """ Render a docstring as a sequence of lines.
+        The argument is either a docstring or an object"""
+    if type(func) is not str:
+        doc = func.__doc__
+    else:
+        doc = func
+    if doc is None:
+        return []
+    doc = indent_str + q + doc.replace(q, "\\"+q) + q + closing_str
+    doc2 = doc
+    if q in doc and redo:
+        doc2 = render_docstr(func, indent_str, closing_str, "'''", False)
+    if not redo:
+        return doc # recursion case
+    doc = (doc, doc2)[len(doc2) < len(doc)]
+    return [line for line in doc.split('\n')]
+



More information about the Pypy-commit mailing list