Author: gwilson
Date: 2007-11-25 12:14:18 -0600 (Sun, 25 Nov 2007)
New Revision: 6714

Modified:
   django/trunk/django/utils/datastructures.py
Log:
Made `MultiValueDict`'s `get` and `getlist` method docstrings more descriptive.


Modified: django/trunk/django/utils/datastructures.py
===================================================================
--- django/trunk/django/utils/datastructures.py 2007-11-25 18:11:44 UTC (rev 
6713)
+++ django/trunk/django/utils/datastructures.py 2007-11-25 18:14:18 UTC (rev 
6714)
@@ -211,7 +211,10 @@
         return result
 
     def get(self, key, default=None):
-        """Returns the default value if the requested data doesn't exist."""
+        """
+        Returns the last data value for the passed key.  If key doesn't exist
+        or value is an empty list, then default is returned.
+        """
         try:
             val = self[key]
         except KeyError:
@@ -221,7 +224,10 @@
         return val
 
     def getlist(self, key):
-        """Returns an empty list if the requested data doesn't exist."""
+        """
+        Returns the list of values for the passed key.  If key doesn't exist,
+        then an empty list is returned.
+        """
         try:
             return super(MultiValueDict, self).__getitem__(key)
         except KeyError:


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to