summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-11-25 18:14:18 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-11-25 18:14:18 +0000
commitc7181ec0ff14fb1515f009114b6d99f8374a819e (patch)
treed18b8238834adad5683340e93a61898edb915258 /django/utils/datastructures.py
parent891cc5df92cb0fc765d3f9e5413170001d97f470 (diff)
Made `MultiValueDict`'s `get` and `getlist` method docstrings more descriptive.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r--django/utils/datastructures.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index 3bb75d262e..ffdc73f922 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -211,7 +211,10 @@ class MultiValueDict(dict):
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 @@ class MultiValueDict(dict):
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: