Commits

Luke Stebbing committed 46b5266

Tweak docstrings based on Mike's suggestions.

Comments (0)

Files changed (2)

webhelpers/media.py

 
 def choose_height(new_width, width, height):
     """Return the height corresponding to ``new_width`` that's proportional
-       to the original size (``width * height``).
+       to the original size (``width`` x ``height``).
     """
     proportion = float(height) / float(width)
     return int(new_width * proportion)
     or is not in a format recognized by PIL.
 
     Depends on the `Python Imaging Library
-    <http://pypi.python.org/pypi/PIL>`_. See ``get_dimensions()`` if your
-    application is not otherwise using PIL.
+    <http://pypi.python.org/pypi/PIL>`_. If your application is not
+    otherwise using PIL, see the ``get_dimensions()`` function, which does
+    not have external dependencies.
     """
     import Image
     try:

webhelpers/mimehelper.py

     def add_alias(cls, alias, mimetype):
         """Create a MIMEType alias to a full mimetype.
 
-        Examples: ``('html', 'text/html')``, ``('xml', 'application/xml')``.
+        Examples:
 
-        An ``alias`` may not contain a ``/`` character.
+        - ``add_alias('html', 'text/html')``
+        - ``add_alias('xml', 'application/xml')``
+
+        An ``alias`` may not contain the ``/`` character.
 
         """
         if '/' in alias: