summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-07-25 09:12:59 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-07-25 22:58:48 +0200
commitab6cd1c839b136cbc94178da433b2e97ab7f6061 (patch)
treea10e8bbb13b84e8157fb1509d3e5d39434da9a1a /docs
parent4b5cb116e30020c459ad8c9314ae9311b461beb5 (diff)
[py3] Updated dict-like data structures for Python 3.
The keys/items/values methods return iterators in Python 3, and the iterkeys/items/values methods don't exist in Python 3. The behavior under Python 2 is unchanged.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/python3.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/topics/python3.txt b/docs/topics/python3.txt
index 7c1cb53150..3f799edac7 100644
--- a/docs/topics/python3.txt
+++ b/docs/topics/python3.txt
@@ -120,3 +120,18 @@ If you need different code in Python 2 and Python 3, check :data:`six.PY3`::
This is a last resort solution when :mod:`six` doesn't provide an appropriate
function.
+
+.. module:: django.utils.six
+
+Customizations of six
+=====================
+
+The version of six bundled with Django includes a few additional tools:
+
+.. function:: iterlists(MultiValueDict)
+
+ Returns an iterator over the lists of values of a
+ :class:`~django.utils.datastructures.MultiValueDict`. This replaces
+ :meth:`~django.utils.datastructures.MultiValueDict.iterlists()` on Python
+ 2 and :meth:`~django.utils.datastructures.MultiValueDict.lists()` on
+ Python 3.