Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Made `MultiValueDict`'s `get` and `getlist` method docstrings more de…

…scriptive.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c7181ec0ff14fb1515f009114b6d99f8374a819e 1 parent 891cc5d
Gary Wilson Jr. authored November 25, 2007

Showing 1 changed file with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. 10  django/utils/datastructures.py
10  django/utils/datastructures.py
@@ -211,7 +211,10 @@ def __deepcopy__(self, memo=None):
211 211
         return result
212 212
 
213 213
     def get(self, key, default=None):
214  
-        """Returns the default value if the requested data doesn't exist."""
  214
+        """
  215
+        Returns the last data value for the passed key.  If key doesn't exist
  216
+        or value is an empty list, then default is returned.
  217
+        """
215 218
         try:
216 219
             val = self[key]
217 220
         except KeyError:
@@ -221,7 +224,10 @@ def get(self, key, default=None):
221 224
         return val
222 225
 
223 226
     def getlist(self, key):
224  
-        """Returns an empty list if the requested data doesn't exist."""
  227
+        """
  228
+        Returns the list of values for the passed key.  If key doesn't exist,
  229
+        then an empty list is returned.
  230
+        """
225 231
         try:
226 232
             return super(MultiValueDict, self).__getitem__(key)
227 233
         except KeyError:

0 notes on commit c7181ec

Please sign in to comment.
Something went wrong with that request. Please try again.