From 813c48e6eb146a06d40b4d11efebee1d1493665d Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 14 Sep 2007 03:17:46 +0000 Subject: [PATCH] Fixed #4726 -- Added a note about the exception raised by QuerySet.__getitem__. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6155 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/request_response.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/request_response.txt b/docs/request_response.txt index 867464226a..1eef41659a 100644 --- a/docs/request_response.txt +++ b/docs/request_response.txt @@ -183,6 +183,9 @@ subclass of dictionary. Exceptions are outlined here: * ``__getitem__(key)`` -- Returns the value for the given key. If the key has more than one value, ``__getitem__()`` returns the last value. + Raises ``django.utils.datastructure.MultiValueDictKeyError`` if the key + does not exist (fortunately, this is a subclass of Python's standard + ``KeyError``, so you can stick to catching ``KeyError``). * ``__setitem__(key, value)`` -- Sets the given key to ``[value]`` (a Python list whose single element is ``value``). Note that this, as