From ab6cd1c839b136cbc94178da433b2e97ab7f6061 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Wed, 25 Jul 2012 09:12:59 +0200 Subject: [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. --- docs/topics/python3.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs/topics/python3.txt') 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. -- cgit v1.3