Fixed #28037 -- Clarified that QueryDict.items()/values() are generators.
This commit is contained in:
parent
31e0b3b40b
commit
8ab7ce8558
|
@ -473,19 +473,21 @@ a subclass of dictionary. Exceptions are outlined here:
|
|||
.. method:: QueryDict.items()
|
||||
|
||||
Like :meth:`dict.items`, except this uses the same last-value logic as
|
||||
:meth:`__getitem__`. For example::
|
||||
:meth:`__getitem__` and returns an iterator object instead of a view object.
|
||||
For example::
|
||||
|
||||
>>> q = QueryDict('a=1&a=2&a=3')
|
||||
>>> q.items()
|
||||
>>> list(q.items())
|
||||
[('a', '3')]
|
||||
|
||||
.. method:: QueryDict.values()
|
||||
|
||||
Like :meth:`dict.values`, except this uses the same last-value logic as
|
||||
:meth:`__getitem__`. For example::
|
||||
:meth:`__getitem__` and returns an iterator instead of a view object. For
|
||||
example::
|
||||
|
||||
>>> q = QueryDict('a=1&a=2&a=3')
|
||||
>>> q.values()
|
||||
>>> list(q.values())
|
||||
['3']
|
||||
|
||||
In addition, ``QueryDict`` has the following methods:
|
||||
|
|
Loading…
Reference in New Issue