﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26707	Add a QueryDict.fromkeys() method	wim glenn	nobody	"In django.http.QueryDict, we currently have the following weird behaviour and misleading error messages:

{{{
>>> QueryDict.fromkeys(['k1', 'k2'])
AttributeError: This QueryDict instance is immutable
}}}

It is not possible to pass the mutable kwarg to the initialise in this way, either:

{{{
>>> QueryDict.fromkeys(['k1', 'k2'], mutable=True)
TypeError: fromkeys() takes no keyword arguments
}}}

Django's querydict is-a dict, so the classmethod factory ""fromkeys"" should either
a) work, or
b) be explicitly disabled in the subclass, and documented as such
 
The relevant section in the docs ( https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.QueryDict ) says that:

  > QueryDict implements all the standard dictionary methods because it’s a subclass of dictionary. Exceptions are outlined here: ...

However, there is no mention about the fromkeys method.
"	Bug	closed	HTTP handling	dev	Normal	fixed	http querydict		Ready for checkin	1	0	0	0	0	0
