Commits

Anonymous committed 420a53f

Docs.

Comments (0)

Files changed (3)

 
 webhelpers.number: document __call__ methods.
 
-
+Too many strip_tags / sanitize / bleach functions.
 def plural(n, singular, plural, with_number=True):
     """Return the singular or plural form of a word, according to the number.
 
+    If ``with_number`` is true (default), the return value will be the number
+    followed by the word. Otherwise the word alone will be returned.
+
     Usage:
 
     >>> plural(2, "ox", "oxen")
 def wrap_paragraphs(text, width=72):
     """Wrap all paragraphs in a text string to the specified width.
 
-    ``width`` may also be a ``textwrap.TextWrapper`` instance, in which case it
-    will be used to do the wrapping.  This provides a way to set other options
-    besides the width, and is more efficient when wrapping many texts.
+    ``width`` may be an int or a ``textwrap.TextWrapper`` instance.  
+    The latter allows you to set other options besides the width, and is more
+    efficient when wrapping many texts.  
     """
     if isinstance(width, textwrap.TextWrapper):
         wrapper = width
-"""Utility functions used by various web helpers
+"""Utility functions used by various web helpers.
 
 This module contains support functions used by other helpers, and functions for
 URL manipulation. Most of these helpers predate the 0.6 reorganization; they
         return self.fn(*(self.args + args), **d)
 
 class SimplerXMLGenerator(XMLGenerator):
+    """A subclass of Python's SAX XMLGenerator."""
+
     # Used by webhelpers.feedgenerator
 
     def addQuickElement(self, name, contents=None, attrs=None):