[py3] Fixed iterlists usage in QueryDict

This commit is contained in:
Claude Paroz 2012-08-13 21:25:27 +02:00
parent b109ff8062
commit a025b75f6c
1 changed files with 2 additions and 2 deletions

View File

@ -415,14 +415,14 @@ class QueryDict(MultiValueDict):
def __copy__(self): def __copy__(self):
result = self.__class__('', mutable=True, encoding=self.encoding) result = self.__class__('', mutable=True, encoding=self.encoding)
for key, value in self.iterlists(): for key, value in six.iterlists(self):
result.setlist(key, value) result.setlist(key, value)
return result return result
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
result = self.__class__('', mutable=True, encoding=self.encoding) result = self.__class__('', mutable=True, encoding=self.encoding)
memo[id(self)] = result memo[id(self)] = result
for key, value in self.iterlists(): for key, value in six.iterlists(self):
result.setlist(copy.deepcopy(key, memo), copy.deepcopy(value, memo)) result.setlist(copy.deepcopy(key, memo), copy.deepcopy(value, memo))
return result return result