Commits

Luke Stebbing committed b5228a9

Document misc and number.

Comments (0)

Files changed (3)

docs/modules/misc.rst

 .. automodule:: webhelpers.misc
 
 .. currentmodule:: webhelpers.misc
+
+.. autofunction:: all(seq[, pred])
+.. autofunction:: any(seq[, pred])
+.. autofunction:: no(seq[, pred])
+.. autofunction:: count_true(seq[, pred])
+.. autofunction:: convert_or_none
+
+.. autoclass:: DeclarativeException
+    :members:
+    :undoc-members:

docs/modules/number.rst

 .. automodule:: webhelpers.number
 
 .. currentmodule:: webhelpers.number
+
+.. autofunction:: percent_of
+.. autofunction:: mean
+.. function:: average(r)
+
+    Another name for ``mean(r)``.
+
+.. autofunction:: median
+.. autofunction:: standard_deviation
+
+.. autoclass:: SimpleStats
+    :members:
+    :undoc-members:
+
+.. autoclass:: Stats
+    :members:
+    :undoc-members:
+
+.. autofunction:: format_number

webhelpers/misc.py

 
 def convert_or_none(value, type_):
     """Return the value converted to the type, or None if error.
+
     ``type_`` may be a Python type or any function taking one argument.
 
     >>> print convert_or_none("5", int)
     """A simpler way to define an exception with a fixed message.
 
     Example:
+
     >>> class MyException(DeclarativeException):
     ...     message="can't frob the bar when foo is enabled"
     ...
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.