Luke Stebbing avatar Luke Stebbing committed 84c373e

Document 'util'.

Comments (0)

Files changed (2)

docs/modules/util.rst

 .. automodule:: webhelpers.util
 
 .. currentmodule:: webhelpers.util
+
+.. autofunction:: update_params
+.. autofunction:: cgi_escape
+.. autofunction:: html_escape
+.. autofunction:: iri_to_uri
+
+.. autoclass:: Partial
+    :members:
+    :undoc-members:
+
+.. autoclass:: SimplerXMLGenerator
+    :members:
+    :undoc-members:
+
+.. autoclass:: UnicodeMultiDict
+    :members:
+    :undoc-members:

webhelpers/util.py

     This function does not handle multiple parameters with the same name.
     It will arbitrarily choose one value and discard the others.
 
-    *Debug mode:* if a pseudo-parameter '_debug' with a true value is passed,
+    *Debug mode:* if a pseudo-parameter ``_debug=True`` is passed,
     return a tuple: ``[0]`` is the URL without query string or fragment,
     ``[1]`` is the final query parameters as a dict, and ``[2]`` is the
     fragment part of the original URL or the empty string.
 
-    Usage::
+    Usage:
+
     >>> update_params("foo", new1="NEW1")
     'foo?new1=NEW1'
     >>> update_params("foo?p=1", p="2")
 
 class Partial(object):
     
-    """Partial object, which will be in Python 2.5"""
+    """
+    A partial function object.
+
+    Equivalent to functools.partial, which was introduced in Python 2.5.
+
+    """
     
     def __init__(*args, **kw):
         self = args[0]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.