﻿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
20584	Django's Memcached backend get_many() doesn't handle generators	guyon.moree@…	nobody	"When the ""keys"" parameter to get_many() is a generator, the values will be lost in the zip function.  

https://github.com/django/django/blob/master/django/core/cache/backends/memcached.py#L93

Here's a simplified code example:


{{{
def make_key(k):
	return k

user_ids = (11387, 1304318)

keys = ('user_%d' % x for x in user_ids)

new_keys = map(lambda x: make_key(x), keys)

m = dict(zip(new_keys, keys))

assert( m == {} )
}}}


I believe this is related to this zip() behaviour: http://stackoverflow.com/questions/11210300/why-does-zip-drop-the-values-of-my-generator

I encountered this bug when upgrading from django 1.3 to django 1.5.1"	Bug	new	Core (Cache system)	1.5	Normal				Unreviewed	0	0	0	0	0	0
