Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#7331 closed (fixed)

QueryDict.iteritems behaves differently than QueryDict.items

Reported by: keturn Owned by: jurev
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The values returned by QueryDict.items() are single values, but the values returned by QueryDict.iteritems() are lists.
We found this out from

In [6]: d =QueryDict('a=1&a=2&b=3')

In [7]: d
Out[7]: <MultiValueDict: {'a': ['1', '2'], 'b': ['3']}>

In [8]: d.items()
Out[8]: [('a', '2'), ('b', '3')]

In [9]: list(d.iteritems())
Out[9]: [('a', ['1', '2']), ('b', ['3'])]

Attachments (1)

7331.diff (1.1 KB) - added by jurev 8 years ago.
MultiValueDict.iteritems() patch with unittest

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by jurev

MultiValueDict.iteritems() patch with unittest

comment:1 Changed 8 years ago by jurev

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to jurev
  • Patch needs improvement unset
  • Status changed from new to assigned

Warning: The patch might break compatibility with code that depends on the problematic behaviour.

comment:2 Changed 8 years ago by jurev

  • Version changed from 0.96 to SVN

comment:3 Changed 8 years ago by Simon Greenhill

  • milestone set to 1.0 alpha
  • Triage Stage changed from Unreviewed to Design decision needed

comment:4 Changed 8 years ago by garcia_marc

  • milestone changed from 1.0 alpha to post-1.0

According to ticket organization defined in 1.0 alpha tickets should be just features in the Must have ( list.

Change to 1.0 beta if you can make this feature be added to May be features (

comment:5 Changed 8 years ago by mtredinnick

  • milestone changed from post-1.0 to 1.0

Arguably a bug.

comment:6 Changed 8 years ago by gwilson

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in [8399].

comment:7 Changed 5 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top