[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/ Move z.c.docutils docstring examples to the API reference.

Tres Seaver cvs-admin at zope.org
Tue May 8 01:17:12 UTC 2012


Log message for revision 125700:
  Move z.c.docutils docstring examples to the API reference.
  
  We don't need to build docs or run their snippets under Python3,
  

Changed:
  A   zope.configuration/branches/tseaver-test_cleanup/docs/api/docutils.rst
  U   zope.configuration/branches/tseaver-test_cleanup/docs/index.rst
  U   zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/docutils.py

-=-
Added: zope.configuration/branches/tseaver-test_cleanup/docs/api/docutils.rst
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/docs/api/docutils.rst	                        (rev 0)
+++ zope.configuration/branches/tseaver-test_cleanup/docs/api/docutils.rst	2012-05-08 01:17:09 UTC (rev 125700)
@@ -0,0 +1,26 @@
+:mod:`zope.configuration.docutils`
+================================
+
+.. module:: zope.configuration.docutils
+
+.. autofunction:: wrap
+
+   Examples:
+
+   .. doctest::
+
+      >>> from zope.configuration.docutils import wrap
+      >>> print wrap('foo bar')[:-2]
+      foo bar
+      >>> print wrap('foo bar', indent=2)[:-2]
+        foo bar
+      >>> print wrap('foo bar, more foo bar', 10)[:-2]
+      foo bar,
+      more foo
+      bar
+      >>> print wrap('foo bar, more foo bar', 10, 2)[:-2]
+        foo bar,
+        more foo
+        bar
+
+.. autofunction:: makeDocStructures

Modified: zope.configuration/branches/tseaver-test_cleanup/docs/index.rst
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/docs/index.rst	2012-05-08 01:17:03 UTC (rev 125699)
+++ zope.configuration/branches/tseaver-test_cleanup/docs/index.rst	2012-05-08 01:17:09 UTC (rev 125700)
@@ -15,6 +15,7 @@
    :maxdepth: 2
 
    api/config
+   api/docutils
 
 
 Indices and tables

Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/docutils.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/docutils.py	2012-05-08 01:17:03 UTC (rev 125699)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/docutils.py	2012-05-08 01:17:09 UTC (rev 125700)
@@ -22,21 +22,6 @@
 
 def wrap(text, width=78, indent=0):
     """Makes sure that we keep a line length of a certain width.
-
-    Examples:
-
-    >>> print wrap('foo bar')[:-2]
-    foo bar
-    >>> print wrap('foo bar', indent=2)[:-2]
-      foo bar
-    >>> print wrap('foo bar, more foo bar', 10)[:-2]
-    foo bar,
-    more foo
-    bar
-    >>> print wrap('foo bar, more foo bar', 10, 2)[:-2]
-      foo bar,
-      more foo
-      bar
     """
     paras = para_sep.split(text.strip())
 



More information about the checkins mailing list