Commits

Luke Stebbing  committed b5228a9

Document misc and number.

  • Participants
  • Parent commits 46b5266

Comments (0)

Files changed (3)

File 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:

File 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

File 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"
     ...